-
Notifications
You must be signed in to change notification settings - Fork 14
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
Cache eviction problem #9
Comments
There is already something in place for that, but there's a missing link with the configuration. |
It should work now with version BTW, region eviction works for memcached by using an increment (similar to what's described here https://github.com/memcached/memcached/wiki/ProgrammingTricks#deleting-by-namespace ): a "clearIndex" value that is always included in the cache-key generation. Because of this, using clear a lot might be quite expensive. This also means that in your "Evidence 2" scenario, after you clear the second level cache the number of keys won't decrease (only after the old clearIndex will expire). The "Evidence 1" scenario, however, should be fixed. |
Excellent, thanks a lot for the quick fix. Much appreciated! I can confirm it works now. Closing issue. |
It appears that cache eviction is not working properly. Versions:
In our app we are relying on clearing / evicting the second level cache. The code looks like this:
This works when ehcache is used as cache provider. However, this code appears to have no effect when using hibernate-l2-memcached as cache provider.
Evidence 1
Evidence 2
Conclusion
It appears that hibernate-l2-memcached is not implementing the programmatic cache eviction contract properly based on these observations.
The text was updated successfully, but these errors were encountered: