Forum: NGINX best way to empty nginx cache

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Fcaa940f447c1c76afb8ee2448ba0461?d=identicon&s=25 Jérôme Loyet (Guest)
on 2009-06-03 11:41
(Received via mailing list)
Hi all,

what is the best and quickest way to empty the whole cache (set via
proxy_cache_path) ?

I'm developing an small web site which allow my customers to empty
their site cache.

I would do:
1- find /path/to/cache -type f -exec rm {}\;
2- gracefull reload nginx to clear the shared memory used to handle
cache

what do you think ?

++ jerome
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-06-03 12:23
(Received via mailing list)
On Wed, Jun 03, 2009 at 11:30:49AM +0200, J?r?me Loyet wrote:

> 2- gracefull reload nginx to clear the shared memory used to handle cache
>
> what do you think ?

Only 1st item is enough. Reload does not clear shared memory.
Fcaa940f447c1c76afb8ee2448ba0461?d=identicon&s=25 Jérôme Loyet (Guest)
on 2009-06-03 14:18
(Received via mailing list)
2009/6/3 Igor Sysoev <is@rambler-co.ru>:
>> I would do:
>> 1- find /path/to/cache -type f -exec rm {}\;
>> 2- gracefull reload nginx to clear the shared memory used to handle cache
>>
>> what do you think ?
>
> Only 1st item is enough. Reload does not clear shared memory.

Thx igor
This topic is locked and can not be replied to.