perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Moseley" <moseleym...@gmail.com>
Subject Re: Apache::Session: can I have a "date" in session
Date Thu, 27 Apr 2006 16:34:13 GMT
>
>
> 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.

Mime
View raw message