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

redis will not work with Silverstripe #3

Open
sunnysideup opened this issue Dec 11, 2016 · 1 comment
Open

redis will not work with Silverstripe #3

sunnysideup opened this issue Dec 11, 2016 · 1 comment

Comments

@sunnysideup
Copy link

Have a look: silverstripe/silverstripe-framework#6383... From what I can gather Redis caching will not actually work with Silverstripe 3.5

@patricknelson
Copy link

Hello from 3yrs in the future 👋

It's worth noting here that this only applies if you're using Redis caching for the aggregate named back-end. So, if you configure Redis to cache everything via any, you'll encounter the bug. For example:

// Bug!
SS_Cache::pick_backend('primary_redis', 'any', 10);

// No bug.
SS_Cache::pick_backend('primary_redis', 'cacheblock', 10);

This is because DataObject clearing everything emerges from calling ->flushCache() that then calls Aggregate::flushCache() which then specifically fetches the back-end caching mechanism for aggregate which then finally looks for tag compatibility and then ends up clearing the entire cache (bad!). So a good fix is just to configure the Redis back-end for those things which you specifically want to leverage Redis for.

This should obviously not be an issue in SS v4 as noted in that thread.

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