Welcome! Log In Create A New Profile

Advanced

Re: Nginx cache 1 KEY into multiple cache files (cache not running)

Maxim Dounin
November 19, 2015 08:28AM
Hello!

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:

http://nginx.org/r/proxy_ignore_headers

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

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx cache 1 KEY into multiple cache files (cache not running)

semseoymas November 18, 2015 09:40PM

Re: Nginx cache 1 KEY into multiple cache files (cache not running)

semseoymas November 18, 2015 11:31PM

Re: Nginx cache 1 KEY into multiple cache files (cache not running)

Maxim Dounin November 19, 2015 08:28AM

Re: Nginx cache 1 KEY into multiple cache files (cache not running)

geberhart November 19, 2015 09:14AM

Re: Nginx cache 1 KEY into multiple cache files (cache not running)

Maxim Dounin November 19, 2015 11:00AM

Re: Nginx cache 1 KEY into multiple cache files (cache not running)

semseoymas November 19, 2015 06:46PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 302
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready