wp-fastest-cache緩存問題測試

最近在測試緩存問題·緩存測試已經命中·但還沒能完全直接訪問靜態,不知道程序問題還是其他問題。

 

wp-fastest-cache緩存問題測試

location / {
if (-f $request_filename) {
break;
}
set $caches 1;
set $request_file $document_uri;
set $cache_file ''; 
if ($request_method = POST) {
set $caches 0;
}
if ($caches = 0) {
set $request_file '';
}
if ($request_file ~ ^(.+)$) {
set $cache_file /wp-content/cache/all/$1/index.html;
}
if (-f $document_root$cache_file) {
rewrite ^ $cache_file last;
}
if (!-e $request_filename) {
rewrite . /index.php last;
}
} 
location /wp-content/cache/all/ { #這一行是你的WP Fastest Cache緩存文件路徑
add_header Cache HIT; #添加header頭,表示命中了緩存
}
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
新媒體運營,新媒體代運營,cloudneo

原創文章,作者:超哥,如若轉載,請註明出處:https://www.chaoneo.cn/zh-hant/archives/392.html

0 0 投票
五星評級

如果您覺得超哥分享對您有所幫助的話,記得打賞給我😀

訂閱
提醒
guest
0 評論
內聯反饋
查看所有評論
QQ客服
加我微信
電話聯繫
電子郵件
我們將24小時內回復。
取消
0
喜歡你的想法,請評論x
()
x