Re: [Zope-dev] Session Objects?

2000-05-26 Thread Stuart 'Zen' Bishop

On Wed, 24 May 2000, Morten W. Petersen wrote:

> Are there sheets with these (and similar) notes anywhere on zope.org?
> If not, maybe there should be?

There is the tips section - I've just added this.

-- 
Stuart Bishop  Work: [EMAIL PROTECTED]
Senior Systems Alchemist   Play: [EMAIL PROTECTED]
Computer Science, RMIT


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Session Objects?

2000-05-24 Thread Morten W. Petersen

Are there sheets with these (and similar) notes anywhere on zope.org?
If not, maybe there should be?

-Morten


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Session Objects?

2000-05-24 Thread Morten W. Petersen

> Actually - I tell a slight lie. The DB might be hit once for each
> thread, as the ZSQL cache is not shared between Zope threads. You need
> to be aware of this as a cached result may be refreshed in one thread
> but not yet expired in another and can give ambiguous results and
> unreproducable bugs if you are not aware of it when you are developing. 

Now this is useful information.. =)

-Morten


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Session Objects?

2000-05-24 Thread Stuart 'Zen' Bishop

On Tue, 23 May 2000, Adam Pawliuk wrote:

> Although there is several user characteristics that we would like to store in a 
>session object cached in server RAM, such as the user's unique system ID, greeting 
>name, etc; rather than having to hit the DB for this information on each request. 
>Basically we would like to use something similar to the session objects in ASP 
>(yuck), or Java JSP/servlet model. 
> 
> I've seen several Zope session products although they all seem to hook directly to a 
>DB and don't seem to provide memory persistence which is what we would like to use. 
> 
> Is there any existing products which do this?

Boring old ZSQL Methods actually do exactly what you want - check out the
caching options under the advanced tab (or the ZSQL docs on zope.org).
The database will only be hit the first time you call the method with
a given set of parameters, or when maximum time to cache expires.
If your GUF hooks make use of ZSQL methods, you should have a look
at tuning these too as it can be a big performance improvement.

Actually - I tell a slight lie. The DB might be hit once for each
thread, as the ZSQL cache is not shared between Zope threads. You need
to be aware of this as a cached result may be refreshed in one thread
but not yet expired in another and can give ambiguous results and
unreproducable bugs if you are not aware of it when you are developing. 

-- 
 ___
   // Zen (alias Stuart Bishop) Work: [EMAIL PROTECTED]
  // E N  Senior Systems Alchemist  Play: [EMAIL PROTECTED]
 //__ Computer Science, RMIT WWW: http://www.cs.rmit.edu.au/~zen


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] Session Objects?

2000-05-23 Thread Adam Pawliuk



Hi,
 
We currently have created a site which stores user 
information in a relational DB, using GUF hooks to manage the security from the 
users and roles in the DB. 
 
Although there is several user characteristics that 
we would like to store in a session object cached in server RAM, such as the 
user's unique system ID, greeting name, etc; rather than having to hit the DB 
for this information on each request. Basically we would like to use something 
similar to the session objects in ASP (yuck), or Java JSP/servlet model. 

 
I've seen several Zope session products although 
they all seem to hook directly to a DB and don't seem to provide memory 
persistence which is what we would like to use. 
 
Is there any existing products which do 
this?
 
thanks in advance,
 
Adam