On Apr 21, 2011, at 11:12 AM, Mike Pelletier wrote:

> The only opportunity I have to bind a user identity/object to a
> request is by constructing and throwing away a new Resource tree for
> each request in requestAvatar.  I decided that was probably not what I
> was meant to do.  Instead, I have done something that turns out to
> smell very bad to solve this problem.  What was the correct solution?

Resources can be extremely lightweight objects.  If your actual resource tree 
is heavyweight (containing lots of data, shared caches, etc) you can trivially 
build an overlay resource tree that just remembers the user object and binds it 
to the underlying tree.

So the main question is: why did you decide that this is not what you were 
meant to do?

_______________________________________________
Twisted-web mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web

Reply via email to