参考 
http://www.cnxct.com/several-reminder-in-nginx-fastcgi_cache-and-php-session_cache_limiter
http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_cache
fastcgi_cache_path /data/files/game/nginxcache/content levels=1:2 keys_z inactive=1d max_size=1g;fastcgi_temp_path /data/files/game/nginxcache/temp;fastcgi_cache_key $scheme$request_method$host$request_uri$is_args$args;fastcgi_cache_use_stale error timeout invalid_header http_500;#nocachefastcgi_ignore_headers cache-control expires set-cookie;
server{		set $skip_cache 0;                #post访问不缓存                if ($request_method = post) {                                set $skip_cache 1;                }                #动态查询不缓存                if ($query_string ~* nonocache) {                        set $skip_cache 1;                }                #后台等特定页面不缓存(其他需求请自行添加即可)                if ($request_uri ~* users) {                    set $skip_cache 1;                }                if ($request_uri ~* reply.php) {                    set $skip_cache 1;                }                #对登录后的结果缓存(hehe就是一个判断登录与否的cookei名称)                if ($http_cookie ~* ecm_id) {                                set $skip_cache 1;                }		fastcgi_cache_bypass $skip_cache;                fastcgi_no_cache $skip_cache;                add_header x-cache $upstream_cache_status from $host;                add_header kcache $scheme$request_method$host$request_uri$is_args$args;                fastcgi_cache hpp;                fastcgi_cache_valid 200 301 302 1d;}
以上就介绍了 nginx fastcgi_cache,包括了方面的内容,希望对php教程有兴趣的朋友有所帮助。
   
 
   