Clear nginx cache CentOS : Speedup the updates!
Are you facing trouble while updating website files? Clearing Nginx cache in centos rectifies the problem.
Unfortunately sometimes, when we make any changes in the website pages it might not reflect immediately.
However, by clearing the Nginx cache we can get rid of this problem.
At Bobcares, we often get requests from our customers to clear Nginx cached as part of our Server Management Services.
Today, let’s get into the details on how our Support Engineers help in clearing Nginx cache.
What is Nginx cache
Nginx is an open-source web server that offers low memory usage and high concurrency.
The Nginx cache has been located between a client and an origin server. It stores the contents that pass in between. It reduces system resource usage. When the user request content that the cache has stored, then it returns directly without contacting the origin server. Here, no need to generate pages each time.
However, in certain situations, the changes made were not reflecting right away.
Here, changes might be small, one CSS change may affect a header layout. Which subsequently affects all pages using that header. It seemed like a fail-safe and defensive strategy to prevent stale content by invalidating all pages.
In such cases, we have to clear the Nginx cache to solve the problem.
Let’s see how our Support Engineers help the customers to clear the Nginx cache.
How to Clear Nginx cache CentOS
At Bobcares, where we have more than a decade of expertise in managing servers, we see many customers face problems while updating website files.
Now, let’s see how our Support Engineers fix this problem by Clearing Nginx cache.
Recently, one of the customers approached us with the same problem. He was trying to update the website files and the changes made had not reflected exactly. After analyzing this we could trace that the cache caused the problem. Hence, we helped the customer in clearing the Nginx cache.
We have clear the Nginx cache folder. This has been done via the following steps.
1. Initially, we traced the cache path. Here, it was the default path. We then clear Nginx cached by deleting the files under
In some cases, it can be set in the variable fastcgi_cache_path. Note that the cache folder itself should not be deleted.
2. Thereafter, we removed the cache files by running the following command.
rm -rf /var/cache/nginx/*
3. Finally, we restarted the Nginx to re-enable caching.
service nginx restart
After clearing the Nginx cache, the changes made to the website are reflected. So that the problem had resolved.
[Need any assistance with Clear Nginx cache centos? – We’ll help you]
In short, whenever the changes are made to the website had not reflected the webpage while calling, then we have to clear the Nginx cache. Clear Nginx cache CentOS has been done by deleting all files/folders within the specified cache folder. Today, we saw how our Support Engineers have solved this.