[patch] cache_purge

moda jsqyyy at gmail.com
Mon Aug 17 09:11:51 MSD 2009


great! thanks

2009/8/12 Piotr Sikora <piotr.sikora at frickle.com>

> 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 at frickle.com >
>
>
>


-- 

焦胜强
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
升东网络科技发展(上海)有限公司 运维中心 存储组
Email: jiaosq at mail.51.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20090817/322839fc/attachment.html>


More information about the nginx mailing list