Welcome! Log In Create A New Profile

Advanced

proxy cache

Michał Jaszczyk
May 19, 2009 08:57AM
Hey,

I need a little bit of help in understanding how proxy cache works in
Nginx. I've already managed to set up the cache and it works. Now I'm
tweaking it and I'm having some trouble with the proxy_cache_valid
directive. How does it work exactly? In some recent changelog I found
that the cache now respects "Expires" and "Cache-Control" headers. How
does this relate to proxy_cache_valid? Imagine the following
scenarios:

1. proxy_cache_valid is set to 1h and upstream's response is valid for 2h.
2. proxy_cache_valid is set to 2h and upstream's response is valid for 1h.
3. proxy_cache_valid is set to 1h and upstream's response doesn't
contain any caching hints.

For how long will Nginx cache the response in each of the above scenarios?

Does Nginx respect "Pragma: no-cache" header?

Which "Cache-Control" header directives (see
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9) does
Nginx respect?

What happens if the client sends "If-Modified-Since" header?

How does Nginx deal with "Vary" header?

That's a lot of questions, sorry for that :). Answer to any of them
will be appreciated :). If someone has the time to answer, I'll try to
spend some time and update the Wiki.

Regards,
--
Michał Jaszczyk
Subject Author Posted

proxy cache

Michał Jaszczyk May 19, 2009 08:57AM

Re: proxy cache

Igor Sysoev May 19, 2009 09:13AM

Re: proxy cache

Michał Jaszczyk May 19, 2009 09:39AM

Re: proxy cache

Igor Sysoev May 19, 2009 09:44AM

Re: proxy cache

Sam H. November 04, 2010 10:28AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 88
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 254 on July 05, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready