what is the correct way to flush/delete proxy_cache withoutrestartnginx?

Piotr Sikora piotr.sikora at frickle.com
Tue Dec 22 17:01:21 MSK 2009


> rm -rf /data/nginx/proxy_cache2
> Doesn't that will affect nginx keep creating the cache? I mean doesn't 
> that
> stop proxy cache working since directory doesn't existed?

No, it won't, because nginx will re-create directory when needed. This could 
potentialy disrupt work of cache helpers (cache manager & cache loader), so 
just to be on the safe side you could run this instead:
# rm -rf /data/nginx/proxy_cache2 && killall -HUP nginx

Best regards,
Piotr Sikora < piotr.sikora at frickle.com >




More information about the nginx mailing list