Purge the Nginx cache

Sergey A. Osokin osa at freebsd.org.ru
Fri Apr 22 16:58:02 UTC 2022


Hi Kaushal,

hope you're doing well.

On Fri, Apr 22, 2022 at 10:03:57PM +0530, Kaushal Shriyan wrote:
> Hi,
> 
> I am running the nginx version: nginx/1.20.2 as a reverse proxy server on
> CentOS Linux release 7.9.2009 (Core). Is there a way to purge the cache
> without restarting the nginx server? I am reading a blog which says to use
> nginx bypass purge cache method instead of manually purging Nginx cache
> using the below method.
> 
> $sudo rm -rf /var/cache/nginx/*
> 
> Please let me know the best recommended way to purge cache. Thanks in
> advance. I look forward to hearing from you.

I'd recommend to follow the NGINX Admin Guide, please visit the following link
for details, https://docs.nginx.com/nginx/admin-guide/content-cache/content-caching/

-- 
Sergey A. Osokin



More information about the nginx mailing list