Joeri Verdeyen bio photo

Joeri Verdeyen

Web-engineer, cyclist, Nespresso lover, Strava pusher.

Twitter LinkedIn Instagram Github Stackoverflow Strava

How to clear Nginx FastCGI Caching

Restarting Nginx for the 500th time didn’t cleared the Nginx. You just have to clear the content of the defined Nginx FastCGI Caching folder.

If you have these set:

fastcgi_cache_path /etc/nginx/cache levels=1:2 keys_zone=MYAPP:100m inactive=60m;
fastcgi_cache_key "$scheme$request_method$host$request_uri";

You can do this:

rm -r /etc/nginx/cache/*

Lesson learned 🙈

Thanks for reading

Feel free to leave a comment if you have remarks or like this post