[ic] Sessions in PostgreSQL

Doug Whiteley doug at scotwebshops.com
Tue Feb 12 06:45:28 EST 2008

Peter wrote:
> Keeping in mind here that there is no support in IC for a 
> last_accessed column at all.  In fact, IC will not use such a column 
> at all even if it is kept up to date with triggers or whatever.  It 
> wouldn't be a bad idea to add one so IC can tell when a db session has 
> expired, though.  It would not be difficult to add such a feature to 
> IC, though, if there's enough demand for it.  A new 
> SessionDbExpireField (or something like that) directive should take 
> care of it (with corresponding code in SessionDB.pm).
Yes, I should have pointed out that as it stands I have to use a cron 
job to expire sessions:

0 */6 * * * psql sessions -c "DELETE FROM session_data WHERE 
last_accessed < now() - '6 hours'::interval;"

Douglas Whiteley, Web and Database Developer
Scotweb Marketing Ltd
Tel: 0131 510 0006 Fax: 0870 706 4938
doug at scotwebshops.com http://www.scotweb.co.uk

More information about the interchange-users mailing list