Nginx cache 1 KEY into multiple cache files (cache not running)
guilherme.e at gmail.com
Thu Nov 19 14:12:18 UTC 2015
In these cases, when Vary is present in response headers and generate
multiple cache files for the same key, how nginx determines cache file
names for variants?
On Thu, Nov 19, 2015 at 11:26 AM, Maxim Dounin <mdounin at mdounin.ru> wrote:
> On Wed, Nov 18, 2015 at 09:40:45PM -0500, semseoymas wrote:
> > First, the specs:
> > nginx version: nginx/1.8.0
> > The problem here: if people asks nginx for the same request_uri, it will
> > create multiple files!! this way, the cache is not running ok...
> Multiple cache files for the same key can be created if a backend
> response uses the Vary mechanism to allow multiple resource
> variants. It is supported and taken into account when caching
> since nginx 1.7.7, http://nginx.org/en/CHANGES:
> *) Change: now nginx takes into account the "Vary" header line in a
> backend response while caching.
> If responses are really the same, consider removing Vary from
> backend responses. If it not possible for some reason, you can
> use proxy_ignore_headers to stop nginx from handling Vary in
> responses, e.g.:
> proxy_ignore_headers Vary;
> Some additional details can be found in the documentation here:
> Maxim Dounin
> nginx mailing list
> nginx at nginx.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the nginx