Re: [Zope-dev] RAMcache and container vs. context

2005-05-28 Thread Dieter Maurer
Stefan H. Holek wrote at 2005-5-27 10:59 +0100: A TALES expression may be prohibitively expensive in any case, no matter how simple it is kept. Please make sure to do some comparative profiling. Cache keys are recomputed on every call of the script, AFAICS. The thought of doing this in

Re: [Zope-dev] RAMcache and container vs. context

2005-05-27 Thread Stefan H. Holek
A TALES expression may be prohibitively expensive in any case, no matter how simple it is kept. Please make sure to do some comparative profiling. Cache keys are recomputed on every call of the script, AFAICS. The thought of doing this in restricted Python makes my skin crawl. Stefan

Re: [Zope-dev] RAMcache and container vs. context

2005-05-26 Thread Chris Withers
Paul Winkler wrote: I kinda wish the RAMCache manager allowed other things than REQUEST variables for differentiation. Arbitrary TALES expressions would be nice. Then we could get rid of this hard-coded gunk and get the same effect by having context/getPhysicalPath as one of the expressions.

Re: [Zope-dev] RAMcache and container vs. context

2005-05-26 Thread Paul Winkler
On Thu, May 26, 2005 at 09:12:30AM +0100, Chris Withers wrote: If you could chuck this as a feature request in the collector and assign it to me, I'd love to work on it if I ever find the time... Done. http://www.zope.org/Collectors/Zope/1795 -- Paul Winkler http://www.slinkp.com

Re: [Zope-dev] RAMcache and container vs. context

2005-04-25 Thread Leonardo Rochael Almeida
Sorry for comming late into the fray :-) Em Qui, 2005-04-21 às 19:46 -0400, Paul Winkler escreveu: On Fri, Apr 22, 2005 at 12:27:18AM +0200, Stefan H. Holek wrote: Note that aq_parent() gives you the URL parent, not the container. I see no way around that as the return value of a script may

Re: [Zope-dev] RAMcache and container vs. context

2005-04-25 Thread Paul Winkler
On Mon, Apr 25, 2005 at 03:19:42PM -0300, Leonardo Rochael Almeida wrote: Sorry for comming late into the fray :-) (snip) This alternative won't help you when: * the pythonscript is sensitive to the context AND * it is called w/ 2 or more different contexts on the same request An

[Zope-dev] RAMcache and container vs. context

2005-04-21 Thread Paul Winkler
I never noticed this before today, but apparently RAMCacheManager is sensitive to whether cached items are acquired from the context or from the container. (Zope 2.7.3 but afaict it should behave the same in any recent version). Is that intended behavior or is this a bug? Let's say I have a CMF

Re: [Zope-dev] RAMcache and container vs. context

2005-04-21 Thread Stefan H. Holek
This is due to how Python Scripts compute their cache keys. The relevant snippet from PythonScript._exec() is: asgns = self.getBindingAssignments() name_context = asgns.getAssignedName('name_context', None) if name_context: keyset[name_context]

Re: [Zope-dev] RAMcache and container vs. context

2005-04-21 Thread Paul Winkler
On Fri, Apr 22, 2005 at 12:27:18AM +0200, Stefan H. Holek wrote: This is due to how Python Scripts compute their cache keys. The relevant snippet from PythonScript._exec() is: asgns = self.getBindingAssignments() name_context = asgns.getAssignedName('name_context',