perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Perrin Harkins <per...@elem.com>
Subject Re: [RFC] Apache::SessionManager
Date Fri, 02 Aug 2002 15:33:15 GMT
Enrico Sorcinelli wrote:
> Apache::SessionManager creates an object session (in Header parsing phase, 
> but not obligatorily) and make it available to all other handlers 
> transparently by putting in pnotes. Others handlers can retrieve session
> directly from pnotes or by calling the simple function 
> Apache::SessionManager::get_session($r)

It would be better if you don't instantiate the session until someone 
asks for it the first time.  That will prevent unnecessary work.  Also, 
when using Apache::Session with any locking module except NullLocker, 
it's very important to have the session object exist for the shortest 
possible time because it is locking out all other access to that session 
while it exists.  (For this reason, it's also very important to make 
sure that requests for images and other static objects don't instantiate 
Apache::Session objects.)

> After some search on CPAN I haven't found a mod_perl module that does 
> the same thing (right?).

Some of the Apache::Auth* modules like Apache::AuthCookieURL are close, 
but I don't know of any that do the actual glue with Apache::Session. 
You might want to look at some of the existing modules and see if a 
merge of some kind is possible.

- Perrin


Mime
View raw message