Welcome! Log In Create A New Profile

Advanced

[patch] cache_purge

Piotr Sikora
August 11, 2009 12:42PM
Hello,
this patch adds ability to purge content from nginx's FastCGI and proxy
caches.

Idea, as well as funding, came from yo.se.

Example configuration:
---
proxy_cache_path /tmp/cache keys_zone=tmpcache:10m;

location / {
proxy_pass http://127.0.0.1:8000;
proxy_cache tmpcache;
proxy_cache_key $uri;
}

location ~ /purge(/.*) {
allow 127.0.0.1;
deny all;
proxy_cache_purge tmpcache $1;
}
---

allows:
- anyone to GET http://www.site.com/abc from backend
(and store it in nginx's cache),
- users from 127.0.0.1 to purge "/abc" from cache using GET
http://www.site.com/purge/abc.

Patch against latest nginx (0.8.8):
http://labs.frickle.com/nginx_cache_purge/

Best regards,
Piotr Sikora < piotr.sikora@frickle.com >
Subject Author Posted

[patch] cache_purge

Piotr Sikora August 11, 2009 12:42PM

Re: [patch] cache_purge

moda August 17, 2009 01:11AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 161
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