On 13/07/2005, at 3:32 AM, Gregory (Grisha) Trubetskoy wrote:

P.S. On magic request caching - I think that if this works, then why not, though I think it needs to be bounced around a little more. BTW - from the code below:

   _requestCache[thread].pop()

was this meant to be

        del _requestCache[thread]

I admit I didn't check, but I effectively have a stack of request
objects for the thread and only pop the top one, because if one
does an internal redirect it reenters within same thread but with
a different request object. You thus need to keep the outer request
object around still. When the cleanup handler runs from the
inner internal redirect handler, it should only pop off its own
request object as the outer still needs to be accessible when the
internal redirect returns to the outer handler. This is assuming
the inner internal redirect handlers cleanup handler is run before
it returns back to the outer handler.

Graham

Reply via email to