Skip to content
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

"flush cache" flush all cache on shared redis #41

Closed
pawawat opened this issue Aug 26, 2016 · 1 comment
Closed

"flush cache" flush all cache on shared redis #41

pawawat opened this issue Aug 26, 2016 · 1 comment

Comments

@pawawat
Copy link

pawawat commented Aug 26, 2016

I try setup two wordpress instances and setup unique WP_CACHE_KEY_SALT for each one. When I click "flush cache", plugins flush cache of two instances instead of flushing cache only on that wordpress instance

@pawawat pawawat changed the title "flush cache" flush all instead of flushing only WP_CACHE_KEY_SALT "flush cache" flush all cache on share redis Aug 26, 2016
@pawawat pawawat changed the title "flush cache" flush all cache on share redis "flush cache" flush all cache on shared redis Aug 26, 2016
@tillkruss
Copy link
Member

tillkruss commented Aug 26, 2016

Redis's FLUSHDB command works per database, so you'd need to use different databases for each installation to prevent that from happening.

The alternative, walking through all keys in the database and checking it's prefix isn't performant.

However, if you really need that feature, feel free to submit a PR with a feature flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants