就是使用nginx的proxy_cache缓存,我是这样做的:
location / {
resolver 8.8.8.8;
proxy_pass http://$http_host$uri$is_args$args;
proxy_cache my_cache;
proxy_cache_valid 200 304 302 60m;
proxy_cache_revalidate on;
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
proxy_cache_lock on;
xss_get on;
xss_callback_arg "callback";
content_by_lua_file web.lua;
}
可是这样做缓存是没有生效的, 想知道为什么失效了?应该怎么做?