Req #16923 [Opn->Fbk]: Allow a setter to determine cache expiry

From: Date: Fri, 03 Sep 2010 12:27:56 +0000
Subject: Req #16923 [Opn->Fbk]: Allow a setter to determine cache expiry
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-4758@lists.php.net to get a copy of this message
Edit report at http://pear.php.net/bugs/bug.php?id=16923&edit=1 ID: 16923 Updated by: daniel.oconnor@gmail.com Reported By: mlaak at kv dot ee Summary: Allow a setter to determine cache expiry -Status: Open +Status: Feedback Type: Feature/Change Request -Package: HTTP_Session +Package: HTTP_Session2 Operating System: linux Package Version: 0.5.6 PHP Version: 5.1.1 Roadmap Versions: New Comment: -Status: Open +Status: Feedback -Package: HTTP_Session +Package: HTTP_Session2 Given HTTP_Session2 superceeds HTTP_Session, is this feature request still relevant? If not, we should close this. Previous Comments: ------------------------------------------------------------------------ [2009-12-20 13:21:11] doconnor -Summary: Unvise use of memcache +Summary: Allow a setter to determine cache expiry I'd suggest implementing some kind of way to setTime() around here might not hurt - if not nothing else, just to make it more unit testable. ------------------------------------------------------------------------ [2009-12-18 10:37:11] mlaak I meant 0+ini_get('session.gc_maxlifetime') ------------------------------------------------------------------------ [2009-12-18 10:25:48] mlaak Description: ------------ In HTTP_Session_Container_Memcache:write the expire date is calculated as follows: time() + ini_get('session.gc_maxlifetime') Now when server clocks should be different (I had such a case lately), we get a bug that is very hard to detect. In http://www.php.net/manual/en/function.memcache-set.php expire: ..... You can also use Unix timestamp or a number of seconds starting from current time, but in the latter case the number of seconds may not exceed 2592000 (30 days). So if ini_get('session.gc_maxlifetime')<2592000 then it should be 0++ ini_get('session.gc_maxlifetime') to make use of memcache server time. ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=16923&edit=1

« previous php.pear.bugs (#4758) next »