|  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: 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:
Bug Type:
New email:
PHP Version: OS:


 [2014-02-19 17:52 UTC]
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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-02-19 17:52 UTC]
-Assigned To: +Assigned To: ericsten
 [2014-02-20 16:13 UTC]
Automatic comment from SVN on behalf of ericsten
Log: Fix for php bug 66741: previous fix broke User cache expiry
 [2014-02-20 16:15 UTC]
Automatic comment from SVN on behalf of ericsten
Log: Fix for php bug 66741: Previous fix broke User cache expiry
 [2014-02-20 16:21 UTC]
-Status: Assigned +Status: Closed
 [2014-02-20 16:21 UTC]
Fixed: svn revision 332870 & 332871 in /pecl/wincache/trunk
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon Feb 18 07:01:24 2019 UTC