[CDBI] objects not updated in memory

[prev] [thread] [next] [Date index for 2005/10/26]

From: Patrik Wallstrom
Subject: [CDBI] objects not updated in memory
Date: 09:30 on 26 Oct 2005
Hi,

I have some classes which references objects which use Class::DBI,
more exactly, a session object which store a user object.

In a function which checks to see if the user is still a valid user in
the system (sessions are supposed to last for a while), I want to
refresh the user from the database. This looks something like this:

if (time() - $self->{'_user.timestamp'} >
    $DB::config->get('user.timeout'))
{
    my $user_id = $self->user->id;
    $self->{'_user'}->remove_from_object_index();
    my $user = DB::User->retrieve($user_id);

    ... and some checks on the fresh User object.
}


But ... even if I disable the Live object cache, I never get the
updated user from the database, and I can even see the query from the
database (and I update some records between reads).

Any clues on what is going on?

        -- 
        patrik_wallstrom->foodfight->pawal@xxxxx.xxx->+46-733173956

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

[CDBI] objects not updated in memory
Patrik Wallstrom 09:30 on 26 Oct 2005

Re: [CDBI] objects not updated in memory
Perrin Harkins 14:18 on 26 Oct 2005

Re: [CDBI] objects not updated in memory
Patrik Wallstrom 14:42 on 27 Oct 2005

Fwd: [CDBI] objects not updated in memory
Phil Mitchell 16:17 on 27 Oct 2005

Re: [CDBI] objects not updated in memory
Perrin Harkins 16:47 on 27 Oct 2005

Generated at 09:28 on 02 Nov 2005 by mariachi v0.52