[ZCM] [ZC] 1795/ 1 Request "RAMCacheManager: more explicit key control"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Thu May 26 12:39:13 EDT 2005


Issue #1795 Update (Request) "RAMCacheManager: more explicit key control"
 Status Accepted, Zope/feature low
To followup, visit:
  http://www.zope.org/Collectors/Zope/1795

==============================================================
= Request - Entry #1 by slinkp on May 26, 2005 12:39 pm

 Status: Pending => Accepted

 Supporters added: chrisw

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.

==============================================================



More information about the Zope-Collector-Monitor mailing list