[cgiapp] Possible to avoid updating session last_access time ?

Richard Jones ra.jones at dpw.clara.co.uk
Thu Mar 3 15:49:01 EST 2011


Hi all,

I have an ajax function which polls the server every few minutes, 
looking for new messages for the logged in user. Unfortunately it's 
acting as a keep-alive for the session, as it effectively prevents the 
idle timeout duration ever being reached. I can't set the server poll 
frequency to a value higher than the idle timeout or it defeats the purpose.

I'm using CAP::Session & CAP::Authentication. If there is some way to 
avoid updating the CGI::Session _SESSION_ATIME and/or the 
CAP::Authentication AUTH_LAST_ACCESS values (not sure if both are 
effectively keeping the session alive), that would be good - a patch or 
an existing (undocumented) method? Maybe pass a runtime option to bypass 
updating the atime / last_access values?

Otherwise I'll probably have to move the ajax function out of the app 
entirely, which would be a pity as it shares a lot of the app code.
-- 
Richard Jones


---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 110303-0, 03/03/2011
Tested on: 03/03/2011 20:49:02
avast! - copyright (c) 1988-2011 AVAST Software.
http://www.avast.com





More information about the cgiapp mailing list