SlowFS - Nginx缓存模块


未知
Linux
C/C++

软件简介

SlowFS 是一个 Nginx 的扩展模块,用来给 Nginx 增加了缓存功能。

下面是该模块的简易配置:

http {  
    slowfs_cache_path  /tmp/cache levels=1:2 keys_zone=fastcache:10m;  
    slowfs_temp_path   /tmp/temp 1 2;

    server {  
        location / {  
            root                /var/www;  
            slowfs_cache        fastcache;  
            slowfs_cache_key    $uri;  
            slowfs_cache_valid  1d;  
        }

        location ~ /purge(/.*) {  
            allow               127.0.0.1;  
            deny                all;  
            slowfs_cache_purge  fastcache $1;  
        }  
    }  
}