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;
原創文章,作者:超哥,如若轉載,請註明出處:https://www.chaoneo.cn/zh-hant/archives/392.html
如果您覺得超哥分享對您有所幫助的話,記得打賞給我😀