Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
355 views
in Technique[技术] by (71.8m points)

wordpress - NginX Caching Issue

So I have this rather weird issues with NginX Caching.

I been using the amimoto stack on aws for some time now and it used to run on CentOS until recently it has been switched to amazon linux 2. Since then all the new instances seem to suffer from the same issue...

The issue is when I make changes on website as logged in user I see the changes instantly. But for guests those changes dont show up at all. I have tried using NginX cache controller on WP to clear the cache, but nothing happens, then I tried using 3rd party plugin such as light speed cache, but same result, guests dont see any changes.

So I did some research and the best answer I have found was to use this command to delete NginX cache folder sudo rm -rf /var/cache/nginx/

Once I do this the website goes down and I have to restart the server after which everyone receives a fresh copy of the website with all the changes.

I have also tried to follow some guides on NginX server side caching, but they didnt do anything even when I reduced how long the caching content has time to live, it still would not refresh the cache.

To reproduce this issue you need to start up a new EC2 server with AWS amimoto then make changes and check if you can see your changes in private tab. I can also provide access to a dummy website where you can see this issue for yourself.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...