Purge whole cache zone

Igor Sysoev igor at sysoev.ru
Wed Jan 2 08:46:45 UTC 2013

On Jan 2, 2013, at 12:25 , Tom Barrett wrote:

> Is it possible to have each server{} block write to it's own cache directory? Or otherwise identify cached pages by server{} block?
> The aim is to make it easy to clear all cached pages for a specific site on a box hosting multiple sites.

proxy_cache_path  /path/to/cache/server1  keys_zone=SERVER1:10m;

server {
    server_name server1.domain.com;
    proxy_cache  SERVER1;

proxy_cache_path  /path/to/cache/server2  keys_zone=SERVER2:10m;

server {
    server_name server2.domain.com;
    proxy_cache  SERVER2;

Igor Sysoev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20130102/1c856869/attachment.html>

More information about the nginx mailing list