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

Add a counter, as a potential cache key #2

Open
hannosch opened this issue Apr 23, 2012 · 0 comments
Open

Add a counter, as a potential cache key #2

hannosch opened this issue Apr 23, 2012 · 0 comments

Comments

@hannosch
Copy link

Plone patches in a counter (a BTrees.Length) object onto the catalog which gets updated every time any object is added/changed/removed from the catalog. See https://github.com/plone/Products.CMFPlone/blob/master/Products/CMFPlone/CatalogTool.py#L395

Adding a similar counter to the event index (triggered in un/index_object) would provide a powerful event specific cache key. Using such a key one can add query caches, which get properly invalidated on event changes alone, so one can do these persistently or share them via memcached. One could even add such a cache to the index itself, with some configurable number of items in a LRU cache.

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

1 participant