RAMCacheManager: more explicit key control

Bug #143415 reported by Paul Winkler
2
Affects Status Importance Assigned to Milestone
Zope 2
Invalid
Wishlist
Unassigned

Bug Description

Summary:

It would be nice if RAMCacheManager could be keyed on things other than request variables. Arbitrary TALES expressions would be great. The bindings "container" and "context" could be provided.

Use case: RAMCacheManager is currently sensitive to whether cached scripts are acquired from the context or from the container. A template that calls tal:define="foo context/someScript"
will generate many more cache entries and misses compared to one that calls tal:define="foo container/someScript". This is a potentially large performance difference, and is bad because:

* it's hardcoded policy
* it's undocumented
* there is no way for the cache administrator to work around it
* template authors can work around it by changing "context" to "container" or vice versa, but this is an obscure implicit solution, requires changes to potentially many templates, and it should not be the template author's job.

Full discussion of the issue is in this thread:
http://mail.zope.org/pipermail/zope-dev/2005-April/024707.html

Note a potential pitfall here:
http://mail.zope.org/pipermail/zope-dev/2005-April/024728.html
and a solution if TALES expressions were provided:
http://mail.zope.org/pipermail/zope-dev/2005-April/024731.html

If implemented, this feature should be backward-compatible, which I believe could be achieved by having a default TALES expression of context/getPhysicalPath.

Tags: feature zope
Revision history for this message
ChrisW (chris-simplistix) wrote :

I don't use RAMCacheManager anymore.

Changed in zope2:
assignee: ChrisW (chris-simplistix) → nobody
Changed in zope2:
importance: Low → Wishlist
Revision history for this message
Colin Watson (cjwatson) wrote :

The zope2 project on Launchpad has been archived at the request of the Zope developers (see https://answers.launchpad.net/launchpad/+question/683589 and https://answers.launchpad.net/launchpad/+question/685285). If this bug is still relevant, please refile it at https://github.com/zopefoundation/zope2.

Changed in zope2:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.