Nginx page cache

Great plugin, I use it with nginx and thus obtain a cache only for visitors ..

If possible to check the cookie for logged in user, deleted the cookie once, even with the logged in user cache appears ...
 
Great plugin, I use it with nginx and thus obtain a cache only for visitors ..

If possible to check the cookie for logged in user, deleted the cookie once, even with the logged in user cache appears ...

Can you post your nginx rules you wrote?
 
fastcgi_cache_path /tmp/nginx-cache levels=1:2 keys_zone=XF:100m inactive=30m;
fastcgi_cache_key "$scheme$request_method$host$request_uri";
fastcgi_cache_use_stale error timeout invalid_header http_500;



set $skip_cache 0;

# POST requests
if ($request_method = POST) {
set $skip_cache 1;
}

# Don't cache uris containing the following segments
if ($request_uri ~* "cron.php|admin.php") {
set $skip_cache 1;
}

# Don't use the cache for logged in users
if ($http_cookie ~* "xf_skipPageCache") {
set $skip_cache 1;
}


location ~ .php$ {
try_files $uri /index.php;
include fastcgi_params;
fastcgi_pass unix:/var/run/php5-fpm.sock;

fastcgi_cache_bypass $skip_cache;
fastcgi_no_cache $skip_cache;

fastcgi_cache XF;
fastcgi_cache_valid 30m;
}
 
this configuration, only the css.php is getting cached ...

like the rest of the requests also stay in the cache ... 'm forgetting something??
 
Top Bottom