FRiCKLE / ngx_cache_purge

nginx module which adds ability to purge content from FastCGI, proxy, SCGI and uWSGI caches.
http://labs.frickle.com/nginx_ngx_cache_purge/
Other
1.06k stars 310 forks source link

Cache purge and vary header with new Nginx #36

Open vedranf opened 9 years ago

vedranf commented 9 years ago

Hello,

Nginx will save response to different cache files when Vary: Accept-Encoding is set. That is, one will be uncompressed, other compressed. This module will delete only one version of the file, making it partially usable. This was added in nginx changeset 60fde1bc7236:

http://mailman.nginx.org/pipermail/nginx-devel/2014-October.txt

Changes with nginx 1.7.7 28 Oct 2014

*) Change: now nginx takes into account the "Vary" header line in a
   backend response while caching.
kyledrake commented 9 years ago

FWIW, I had a flavor of this issue with nginx 1.6.2. It would serve the gzipped version even if the client did not request it via Accept-Encoding.

I "fixed" it by turning off upstream compression, but it's obviously not ideal.

senj commented 8 years ago

Can I remove both versions with this plugin manually?