[Zope3-Users] New Request Variable?

Jim Washington jwashin at vt.edu
Fri May 19 16:09:46 EDT 2006


I have an expensive function (the result is a long list of IntIds) that 
I only want to call once in a request.  It only gets calculated the 
first time it is called, and the results may be used anytime after 
that.  But only for the current request.  A subsequent request has to 
recalculate from the beginning.

Session is the wrong place to stash this.  I do not want want it to 
persist beyond the current request.

Request is also the wrong place.  It's slotted; I cannot add variables.

So where is the proper place to hold on to something like this just for 
the duration of one request?

Suggestions (or solutions), anyone?  I fear I may have missed something 
obvious.

-Jim Washington



More information about the Zope3-users mailing list