On 03/03/2011 22:15, Ron Savage wrote: > Hi Richard > > If you switch to Data::Session, you can use $session -> modified(0) in > the server's code to stop the session being saved: > > http://search.cpan.org/~rsavage/Data-Session-1.03/lib/Data/Session.pm#modified() > > Perhaps that will suffice.
Hello Ron, Yes it looks like that scenario was considered during the construction of Data::Session. I remember following the discussion on Data::Session previously, but can't remember if it's a drop-in replacement for CGI::Session - will have to trawl the archives. I'm using CAP::Session anyway, so will need to see how much work is involved in making the switch. Thanks for the suggestion. > On Thu, 2011-03-03 at 20:49 +0000, Richard Jones wrote: >> 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 22:32:19 avast! - copyright (c) 1988-2011 AVAST Software. http://www.avast.com ##### CGI::Application community mailing list ################ ## ## ## To unsubscribe, or change your message delivery options, ## ## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp ## ## ## ## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ## ## Wiki: http://cgiapp.erlbaum.net/ ## ## ## ################################################################
