Re: [CDBI] Class::DBI and Apache::Session - Why does it work?

[prev] [thread] [next] [Date index for 2005/12/02]

From: Matt S Trout
Subject: Re: [CDBI] Class::DBI and Apache::Session - Why does it work?
Date: 22:15 on 02 Dec 2005
On Fri, Dec 02, 2005 at 04:31:36PM -0500, Brian Gorby wrote:
> I'm trying to understand exactly how the following (simplified) scenario 
> works in a mod_perl web application:
> 
> I've mapped a User table to a User entity class which subclasses 
> Class::DBI::MySQL. In the web application, I define
> 
> $user = User->retrieve();
> 
> And then save $user in a session object, which is also stored in a MySQL 
> table.
> 
> %my_session{my_user} = $user;
> 
> I then restart both Apache and MySQL. The session is restored, and I 
> pull back out $user
> 
> $user = %my_session{my_user};
> 
> I can then make any updates I wish to $user. But why? I thought all I 
> persisted was a reference to some memory that would've gotten destroyed 
> upon restarting of servers.

Apache::Session will use a shared store for the session info; it probably
defaults to a temp file somewhere from which it can reload the info even
after restarting your daemons.

        -- 
             Matt S Trout       Offering custom development, consultancy and support
  Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

 + Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +

_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi

(message missing)

Re: [CDBI] Class::DBI and Apache::Session - Why does it work?
Matt S Trout 22:15 on 02 Dec 2005

Generated at 11:26 on 05 Dec 2005 by mariachi v0.52