php 清空cache,到底如何清除 cache? 我真的快瘋了

我現在被緩存搞到快瘋了!

我是在ubuntu 16.04架設網站

然後有用多個站點功能

也啟用了https (用certbot)

站A會到 var/www/html

站B會到 var/www/re

在多個站點設定裡面

000-default.conf是預設的我沒有動它,他是站A的

ServerAdmin webmaster@localhost

DocumentRoot /var/www/html

ErrorLog ${APACHE_LOG_DIR}/error.log

CustomLog ${APACHE_LOG_DIR}/access.log combined

RewriteEngine on

RewriteCond %{SERVER_NAME} =aaa.xxx.com

RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

站B 我取名 xxx-com.conf

ServerName www.xxx.com

DocumentRoot /var/www/re

ErrorLog ${APACHE_LOG_DIR}/error.log

CustomLog ${APACHE_LOG_DIR}/access.log combined

RewriteEngine on

RewriteCond %{SERVER_NAME} =www.xxx.com

RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

我想讓所有的cache都取消掉

但是我不知道要放在哪?

我只知道etc/apache2.conf 我有放

Options Indexes FollowSymLinks

AllowOverride All

Require all granted

Options Indexes FollowSymLinks

AllowOverride All

Require all granted

這是讓 .htaccess 啟用的參數(應該放這沒錯吧?至少可以跑)

我現在超級亂的

我網上查的不要cache代碼

FileETag None

Header unset ETag

Header set Cache-Control "max-age=0, no-cache, no-store, must-revalida$

Header set Pragma "no-cache"

Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"

CacheDisable on

放哪都不對啊一點效也沒有!

更別說在php header/ meta header放no-cache

根本沒有用

然後我的站點很怪

用https瀏覽,當我更新網頁的時候能即時更新(重新整理就可換新)

但當我用http瀏覽,卻死都見不到新的變更!

__

我想讓網頁不要有任何cache

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值