Report this

What is the reason for this report?

Delete Cache Nginx (Not a virtual box)

Posted on July 25, 2015

Hey folks. I’m running a Laravel Site (Ubuntu) on Nginx (Not a virtual box). When I make changes to a css file, or any file for that matter i’m unable to see the changes right away. I’ve tried changing sendfile from on to off as noted in this link:

http://stackoverflow.com/questions/6236078/how-to-clear-the-cache-of-nginx

And I couldn’t find a Nginx cache file to delete the cache. Many sites recommend going to the “path/to/cache” folder but I can’t find it:

https://www.nginx.com/blog/nginx-caching-guide/

Anyway I don’t believe I set up any kind of proxy caching or anything. Any ideas where I can find my cache so I can delete it folks? For that matter am I looking to do the correct thing here? Thanks for you answer in advance.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

In my case the issue was related to opcache. Disabling it in /etc/php/7.2/fpm/php.ini:

opcache.enable=0

does let load the server the latest version of the (php) files again.

Nginx doesn’t do any caching by default. If you haven’t set any caching up in nginx, what makes you think it’s caching anything? And what issue are you trying to solve here that needs this cache cleared?

Good point. Yes I haven’t set up any caching. The problem i’m trying to solve is when I make changes to a css file, or any file for that matter i’m unable to see the changes right away.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.