[Twisted-web] SessionWrapper componentized

Valentino Volonghi aka Dialtone dialtone at divmod.com
Sat Jan 15 04:06:14 MST 2005

On Sat, 15 Jan 2005 01:21:07 +0100, Andrea Arcangeli <andrea at cpushare.com> wrote:
>I'd need the SessionWrapper componentized so I can use compy to store
> global data for the whole site under the sessionwrapper.
> Or is there a better way to do it?

The site already support remembering stuff 'sitewide'

site = appserver.NevowSite(resource=root)
site.remember(foo, IFoo)
guarded = guard.SessionWrapper(site)

Now IFoo is remember for all users.

You can also do:
page_instance.remember(bar, IBar)
And now you have a global user cache.

And so on with more nested contexts

More information about the Twisted-web mailing list