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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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: Thu Apr 25 09:01:29 2024 UTC