-
Notifications
You must be signed in to change notification settings - Fork 35
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
[Feature] Cache queries results #32
Comments
At first, the idea sounds good, but I'm not sure if it can be implemented in a safe way. If settings are modified by the app, cache values could be invalidated properly. But modifying them by e.g. Doctrine migrations would lead to inconsistency between cache and database. |
I agree, but what if we empty the cache in this particular case ? |
How? A migration was only one example. |
Sorry for the delay of my answer. If we relay on a third-party to cache, eg Redis, then we can delete every keys in case of a migration or something similar. Or a least warn the user. In case of an update of an existing setting, then we can just delete the corresponding redis key. I'm mentioning the feature because the LexikTranslationBundle is doing something similar to your bundle, but with translations, and they are using a cache system. Maybe it could be an option, deactivated by default ? |
How about #35? |
Nice ! Thanks ! So when we do |
This will be done by the bundle, yes. Feel free to test it out and let me know about possible improvements for the PR. |
Alright, I will ! Thanks a bunch again ! |
I have just tried it using DoctrineCacheBundle and redis as cache provider, and it's working great ! |
Aaaand merged. 😏 |
Thanks again, great feature ! ;) |
Hi,
Thanks for this great bundle.
I think it would be even more awesome if we could cache the results of the doctrine queries (using redis for example), and of course, invalidate when the value changes.
What do you think ?
-Julien
The text was updated successfully, but these errors were encountered: