> How to use the cache feature?
Here is configuraiton example:
http {
...
proxy_cache_path /path/to/cache levels=1:2 keys_zone=NAME:10m inactive=5m max_size=2m;
...
server {
location / {
proxy_pass
proxy_cache NAME;
proxy_cache_valid 200 302 1h;
proxy_cache_valid 301 1d;
proxy_cache_valid any 1m;
proxy_cache_min_uses 1;
proxy_cache_use_stale error timeout invalid_header http_500;
}
}
The cache currently ignores backend's Cache-Control, Expires, etc.
阅读(1732) | 评论(0) | 转发(0) |