Welcome! Log In Create A New Profile


Getting fastcgi_no_cache to cache the fresh response

April 17, 2011 07:25AM
I have been trying to find a good and standard way of invalidating nginx fastcgi cache. Some time ago we had the fastcgi_cache_bypass filter which was not completely implemented and didn't work (and has been removed from the wiki since). Now the only option seems to be fastcgi_no_cache.

Is there a way to cache that fresh response from the backend when fastcgi_no_cache is 1?

Like this:

1. Nginx receives a request with fastcgi_no_cache 1
2. Nginx skips cache and returns a fresh response from the backend
3. Nginx stores that response in the cache
4. All of the subsequent requests when fastcgi_no_cache 0 (with the same cache_key) return that latest cached response.

Subject Author Posted

Getting fastcgi_no_cache to cache the fresh response

kaspars April 17, 2011 07:25AM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 70
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready