[Zope-dev] Re: Threads, Locks, Volatility, and Angst

Tres Seaver tseaver at zope.com
Wed Mar 31 22:53:30 EST 2004


Ian Beatty wrote:
> On 2004-03-31 5:42 PM, zope at netchan.cotse.net is reputed to have said:
> 
> 
>>Do you use this unique ID only as some kind of session ID?
> 
> 
> Yes, exactly.
> 
> 
>>If you only
>>need these IDs during a session (don't have to store them in ZODB), you
>>can create a thread safe class for managing them and then use an instant
>>of this class as a module global variable in your product.
>>AFAIR, this is the way how exUserFolder implements it's usercache. You
>>can get a clue by examining these files...
> 
> 
> I'll check them out. Thanks.

The root folder of your Zope probably already has an object called 
'browser_id_manager' whose job it is to generate such IDs cheaply;  I 
would recommend using it, instead.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver at zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com



More information about the Zope-Dev mailing list