Tty=600second for cache


#1

I like my cache to be aggressive (most blogs are rather static) so I've set:

fastcgi_cache_valid 200 302  8h;  
fastcgi_cache_valid 301     48h;  

but it looks like all pages still only get cached for 600 seconds. Spitting through the plugin code I came across:

$cache_ttl = 600;  
$http_headers['X-Accel-Expires'] = $cache_ttl;  

Wouldn't it be better to make this (600 sec) a setting in the plugin-settings?

Overwrite this behavior with fastcgi_ignore_headers X-Accel-Expires; does seem to work. As should be correct?


#2

Its a mistake on our end. Rather than adding an option, we can leave cache-duration part to nginx-config only.

We will remove codes that are flushing cache after 600 seconds.

In meantime, you can continue to use fastcgi_ignore_headers X-Accel-Expires; . It won’t create any issue.

In fact, I use fastcgi_ignore_headers on many setups (including this one).


#3

@sj3fk3

Update: Above code has been removed. Please upgrade Nginx Helper plugin on your blog.

If you see any more issues, Please let us know.


#4