php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66741 Fix for bug 65838 broke User cache expiry
Submitted: 2014-02-19 17:52 UTC Modified: 2014-02-20 16:21 UTC
From: ericsten@php.net Assigned: ericsten (profile)
Status: Closed Package: WinCache (PECL)
PHP Version: Irrelevant OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ericsten@php.net
New email:
PHP Version: OS:

 

 [2014-02-19 17:52 UTC] ericsten@php.net
Description:
------------
When fixing Bug 65838 [Session unexpectedly expires], a fix was taken to calculate the expiration time as the difference between the "last used" and "now".  Previously, it was calculated between "added" and "now".  Calculating from "last used" seemed more in-line with the existing comments in the code, as well providing the expected behavior (LRU cache).

I can now see that the place where this fix was made affects *all* of the WinCache caches (File, User, Session), each of which may have a different expectation of when items in the cache should expire.


Expected result:
----------------
File & Session cache should calculate TTL from last use (pvalue->use_ticks).
User cache should calculate TTL from creation (pvalue->add_ticks).

Actual result:
--------------
After fix 65838 applied, User cache calculates TTL from last use.  This breaks the expectation that User cache entries will strictly expire from the time the entry was added to the cache.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-02-19 17:52 UTC] ericsten@php.net
-Assigned To: +Assigned To: ericsten
 [2014-02-20 16:13 UTC] ericsten@php.net
Automatic comment from SVN on behalf of ericsten
Revision: http://svn.php.net/viewvc/?view=revision&revision=332870
Log: Fix for php bug 66741: previous fix broke User cache expiry
 [2014-02-20 16:15 UTC] ericsten@php.net
Automatic comment from SVN on behalf of ericsten
Revision: http://svn.php.net/viewvc/?view=revision&revision=332871
Log: Fix for php bug 66741: Previous fix broke User cache expiry
 [2014-02-20 16:21 UTC] ericsten@php.net
-Status: Assigned +Status: Closed
 [2014-02-20 16:21 UTC] ericsten@php.net
Fixed: svn revision 332870 & 332871 in /pecl/wincache/trunk
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 21:01:30 2024 UTC