fastcgi_cache

ariel_esp nginx-forum at nginx.us
Mon Jun 23 17:08:33 UTC 2014


Hi, I already try this... but... not work =/
when in the page, I do "shift+f5", page is re-read "EXPIRED"... OK
but, this entering in the page, or do F5 ... page = HIT cache...
In this specifics pages, I always put php header "cache-control, pragma,
etc" as "no-cache", so, I want always get a new page from backend...
understand?


fastcgi_cache           microcache;
fastcgi_cache_key      
$scheme$request_method$host$request_uri$http_x_custom_header;
fastcgi_cache_valid     any 1m;
proxy_cache_use_stale   error timeout invalid_header updating http_500
http_502 http_503 http_504;
fastcgi_cache_lock      on;
add_header              Fastcgi-Cache $upstream_cache_status;

if ($cache_uri != "null cache") 
{
add_header              Fastcgi-Cache $upstream_cache_status;
add_header              X-Cache-Debug "$cache_uri $cookie_nocache
$arg_nocache$arg_comment $http_pragma $http_authorization";
set $skip_cache         0;
}

fastcgi_cache_bypass    $skip_cache;
fastcgi_no_cache        $skip_cache;

fastcgi_cache_bypass    $cookie_nocache $arg_nocache$arg_comment ;
fastcgi_no_cache        $cookie_nocache $arg_nocache$arg_comment;

fastcgi_cache_bypass    $http_pragma $http_authorization ;
fastcgi_no_cache        $http_pragma    $http_authorization;

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,251112,251115#msg-251115



More information about the nginx mailing list