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.

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.

-- 
Ron Savage
http://savage.net.au/
Ph: 0421 920 622


#####  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/                 ##
##                                                            ##
################################################################

Reply via email to