How to clear the cache of nginx?

2019-01-03 19:54发布

I use nginx to as the front server, I have modified the CSS files, but nginx is still serving the old ones.

I have tried to restart nginx, to no success and I have Googled, but not found a valid way to clear it.

Some articles say we can just delete the cache directory: var/cache/nginx, but there is no such directory on my server.

What should I do now?

标签: caching nginx
19条回答
等我变得足够好
2楼-- · 2019-01-03 20:43

I had this problem also.

  • Could not find any nginx/cache folder
  • sendfile was off

My domain uses cloudflare.com for DNS (great service!). Aha! There it was:

cloudflare.com -> caching -> Purge Cache (I purged everything) That solved my problem!

查看更多
登录 后发表回答