Hello,
I noticed that because of this part of nginx conf, cache is disabled for logged in users;
# Don't use the cache for logged in users or recent commenters
if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in") {
set $skip_cache 1;
}
I would like to have caching working for certain pages even when logged, and I tried something like this;
if ($request_uri ~* "/specific-page") {
set $skip_cache 0;
}
This changes X-Fastcgi-Cache from BYPASS TO MISS, but it never hits. I think this is due to this header;
Cache-Control:
no-cache, must-revalidate, max-age=0, no-store, private
I tried to override it like this;
location ~ \.php$ {
if ($request_uri ~* "/specific-page") {
add_header Cache-Control "public, max-age=3600, s-maxage=3600";
}
}
This however, does not change anything. IS this possible - am I missing something?