[CDBI] Re: Serializing a CDBI object
"Edward J. Sabol" <sabol-2oVx0MVsMgiP/[email protected]> Wed, 2 May 2007 12:31:57 -0400
| Newsgroups | gmane.comp.lang.perl.modules.class-dbi |
|---|---|
| Message-ID | <[email protected]> |
Bill Moseley wrote: > I'm currently saving the user id in the session and then for each > request retrieving the user object again. So, I'm curious to see what > it might take to save their object in the session to avoid the trip to > the database for every request. In this situation it's ok to have stale > user data for the entire session. Are you using mod_perl? If so, I think just storing the user object in $r->pnotes() would be a lot easier... http://perl.apache.org/docs/2.0/api/Apache2/RequestUtil.html#C_pnotes_ But I guess that wouldn't be shared across multiple Apache child processes. What method are you thinking of using? Memcached?