-
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 a single site in subfolder multisite setups #122
Conversation
Removed redundant closing tag.
…nly!). Added support for purging wildcard urls (Redis Only!). Various code clean up.
Implements the new Purgeable interface, but doesn't yet support single site purging nor wildcard purging.
Stops spam in debug.log at the notice level.
Hello @larssn Thanks for the PR. I applied different solution to purge single site cache in multisite setup. It's work for both sub-domain and sub-directory site. Please check my commit c4dc90d I haven't merge this PR as it contain more changes and for the main issue I applied different solution. Please let me know your wordpress.org username so I can add in contributors list. Thanks again. |
Hello @larssn I have released the plugin. Please check. Thanks for your help. |
Cool, it looks like that would purge correctly. Gonna test it. Ps. I use nuvoPoint (my company) as my username. |
So there's still an issue if you're using domain mapping: Lemme explain. So if Redis contains this:
.. and I'm standing in the network admin page at cloud.nuvoweb.dk/network, and press "Purge Cache", then the entire cache is deleted, including onekey and asia, which are different domains. It should optimally look like this afterwards:
I had fixed this in this pull request, by adding a new helper action called "site", that only purges the cache for a single domain. |
Hello @larssn The interface might be confusing. If you Purge Cache from Network Admin then it will purge all site cache in WPMU. If you want to purge cache of individual site then goto the individual site dashboard and click on Purge Cache button. Let me know if this make sense. Regards, |
Yeah I get it, maybe my example didn't make sense. |
If your domain is setup as www.example.com/site1/, www.example.com/site2/ etc., then pressing the "Purge Cache" button on one of those sites will now only purge the cache for that site. Tested and working.
Same should be true for subdomain multisite setups.
Ps. Don't merge the readme file.