[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modperl
Subject:    Re: Request-local storage?
From:       Simon Perreault <nomis80 () lqt ! ca>
Date:       2005-07-22 15:49:18
Message-ID: 200507221149.18972.nomis80 () lqt ! ca
[Download RAW message or body]

On Friday 22 July 2005 11:08, Joe Cullin wrote:
> 1. Use $ENV{'UNIQUE_ID'}  (set my mod_unique_id?)
> This seems to be a different value for every request.  So I can create 2
> global variables, $lastId and %savedData.  If $lastId != $ENV{'UNIQUE_ID'}
> then I know I'm in a new request and I can wipe out %savedData.

Very nice. Using this solution I don't even need to test whether I'm running 
under mod_perl or not.

> 2. Use a global variable and clean it up at the end of each request using
> "cleanup_register" from APR::Pool.  This is within an "if ($mod_perl)"
> block, so it won't affect the mod_cgi script.

Oooooooh! That's cool! I now have many more solution options than I was asking 
for, I'll have the burden of choosing one among them.

Thanks a lot!
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic