Loading ...
Sorry, an error occurred while loading the content.
 

Re: Request-local storage?

Expand Messages
  • Simon Perreault
    ... Very nice. Using this solution I don t even need to test whether I m running under mod_perl or not. ... Oooooooh! That s cool! I now have many more
    Message 1 of 8 , Jul 22, 2005
      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!
    Your message has been successfully submitted and would be delivered to recipients shortly.