質問編集履歴

2

書き間違え

2022/03/15 00:15

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -6,8 +6,10 @@
6
6
  「x-cache-status HIT」
7
7
  となるのでしょうか?
8
8
  キャッシュファイルを削除すれば
9
- 「x-cache-status HIT」になりましたが、数分後にまた「x-cache-status EXPIRED」になります。
9
+ 「x-cache-status HIT」になりましたが、1回目以降のアクセスは「x-cache-status EXPIRED」になります。
10
10
  キャッシュフォルダーにはキャッシュが生成されていました。
11
+ 「x-cache-status EXPIRED」は翻訳したら
12
+ 「x-cache-status 有効期限切れ」なのでnginxの設定ミスでしょうか?
11
13
  また
12
14
  httpヘッダーに
13
15
  「cache-control」が2つありました。

1

キャッシュを削除したら「x-cache-status HIT」なったが、すぐに「x-cache-status EXPIRED」

2022/03/15 00:07

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -5,6 +5,8 @@
5
5
  どうすれば
6
6
  「x-cache-status HIT」
7
7
  となるのでしょうか?
8
+ キャッシュファイルを削除すれば
9
+ 「x-cache-status HIT」になりましたが、数分後にまた「x-cache-status EXPIRED」になります。
8
10
  キャッシュフォルダーにはキャッシュが生成されていました。
9
11
  また
10
12
  httpヘッダーに
@@ -18,11 +20,7 @@
18
20
  nginxの設定
19
21
  nginx.conf
20
22
 
21
- proxy_cache_path /var/cache/nginx/cache levels=2:2 keys_zone=cache_key:10m max_size=5g inactive=24h;
23
+ proxy_cache_path /var/cache/nginx/cache levels=2:2 keys_zone=cache_key:10m max_size=5g inactive=30m;
22
- fastcgi_ignore_headers X-Accel-Redirect X-Accel-Expires Cache-Control Expires Vary Set-Cookie;
23
- proxy_buffering on;
24
- proxy_ignore_headers Set-Cookie;
25
- proxy_hide_header Set-Cookie;
26
24
 
27
25
  /conf.d/ドメイン名.conf
28
26
 
@@ -47,5 +45,4 @@
47
45
  if ($http_cookie ~* 'comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in') {
48
46
  set $do_not_cache 1;
49
47
  }
50
-
51
48