Chinaunix首页 | 论坛 | 博客
  • 博客访问: 90387
  • 博文数量: 30
  • 博客积分: 2061
  • 博客等级: 大尉
  • 技术积分: 310
  • 用 户 组: 普通用户
  • 注册时间: 2008-05-23 21:42
文章分类
文章存档

2010年(3)

2009年(17)

2008年(10)

我的朋友

分类: 系统运维

2009-03-27 18:21:16

> 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.
阅读(1700) | 评论(0) | 转发(0) |
0

上一篇:nginx cache

下一篇:nginx fastcgi cache

给主人留下些什么吧!~~