fastcgi_cache

Maxim Dounin mdounin at mdounin.ru
Tue Jun 24 02:28:04 UTC 2014


Hello!

On Mon, Jun 23, 2014 at 01:08:33PM -0400, ariel_esp wrote:

> 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?

As long as _response_ headers contain "Cache-Control: no-cache", 
nginx will not cache a response, unless explicitly asked to ignore 
the Cache-Control header (using the fastcgi_ignore_headers 
directive).  No special handling is needed, it will just work.

If it doesn't work for you, this likely means that:

- either you did something wrong in your nginx config (i.e., used 
  fastcgi_ignore_headers to disable Cache-Control handling);

- or you wrote the "Cache-Control: no-cache" incorrectly.

-- 
Maxim Dounin
http://nginx.org/



More information about the nginx mailing list