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

List:       apache-modperl
Subject:    Re: Apache::Session: can I have a "date" in session
From:       Igor Chudov <ichudov () Algebra ! Com>
Date:       2006-04-28 1:58:46
Message-ID: 20060428015846.GA29080 () manifold ! algebra ! com
[Download RAW message or body]

On Thu, Apr 27, 2006 at 09:34:13AM -0700, Mark Moseley wrote:
> >
> >
> > you could also just have apache::session update that column as well
> > on the data store by overrideing the store mechanism
> >
> 
> 
> If you're using MySQL 4.1 or above for your db store, you can also use a
> timestamp column like:
> 
> ts timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP
> 
> MySQL should keep the timestamp current for every update for this column. Of
> course the earlier comment about the extra work for the db still applies.
> Leaving off the "on update CURRENT_TIMESTAMP" part and overriding the update
> method would save you the extra update per update. But if your db is pretty
> unloaded, this is certainly the easiest way to go.

Thanks. This is the way to go. My server serves just a few objects per
second, so the DB is relatively unloaded.

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

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