-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Purge Cache clears the whole Redis cache, of ALL the users/prefixes... #113
Comments
I did an https://github.com/rtCamp/nginx-helper/pull/116 pull request that fixes this problem. |
@Niwreg What happened to this pull request? |
@larssn would love to know that too, I still wait for the merge. Now I have to do all manual, because of the old version in the Wordpress svn. |
@HansVanEijsden If you're using Redis as your caching layer, I made this fork, which fixes the problem, but only in Redis: It's only lightly tested, but tests so far seem to indicate that it works. |
Hello @HansVanEijsden @Niwreg I am sorry for the late response. I have merged the PR and we are doing testing and will release new version soon. Thanks. |
My code is based on the latest master branch. Looking through the code of #116, it doesn't seem to have fixed what you initially asked. It seems related to WPML and another non-related issue. For example, my fix makes a multisite running in subfolders work, which the previous version did not take into account. |
@larssn now I see. Great, thanks for all! |
Made #122 |
Hello @HansVanEijsden I have released the plugin. Please check. Also I am closing this ticket. Thanks for your help. |
When one of my users installs the Nginx Helper (we even deploy it automatically on every new Wordpress installation) and clicks the Purge Cache button in the admin bar on top, it clears the whole Redis database...
All the page caches of all the users flushed, all the object caches of all the users gone, and Redis completely empty.
Imagine this. A 28GB Redis cache size, 800 users. One of those 800 users presses the Purge Cache button on top, and all the other 799 sites have to warm up the cache again. More than 28GB of cache data gone, every time one of those 800 users presses their button. That's a big problem.
Every site has an own prefix, "example.com:" in the Nginx config and in the Nginx Helper plugin.
I use this config: https://easyengine.io/wordpress-nginx/tutorials/single-site/redis_cache-with-conditional-purging/
Is there a way to make the Nginx Helper only purge "example.com:" from Redis when the user presses Purge Cache, in stead of ""?
And if not, is there an easy way to disable the Purge Cache button?
Thanks!
The text was updated successfully, but these errors were encountered: