[Tickets #12735] Xcache not expiring on get() if prefix is set
noreply at bugs.horde.org
noreply at bugs.horde.org
Fri Oct 4 23:47:54 UTC 2013
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/12735
------------------------------------------------------------------------------
Ticket | 12735
Created By | wbreyha at gmx.net
Summary | Xcache not expiring on get() if prefix is set
Queue | Horde Framework Packages
Version | Git master
Type | Bug
State | Unconfirmed
Priority | 3. High
Milestone |
Patch |
Owners |
------------------------------------------------------------------------------
wbreyha at gmx.net (2013-10-04 23:47) wrote:
If eg. kronolith freebusy fb.php uses
$fb = $cache->get($key, 360);
in case of Xcache get() adds the prefix to $key and calls
_setExpire(). But there the prefix is added again.
I think this will work as expected and similar to other caching modules
--------------
--- Xcache.php.orig 2013-10-05 01:44:50.000000000 +0200
+++ Xcache.php 2013-10-05 01:45:58.000000000 +0200
@@ -40,8 +40,10 @@
*/
public function get($key, $lifetime = 0)
{
- $key = $this->_params['prefix'] . $key;
+ /* prefix is added in _setExpire, too */
$this->_setExpire($key, $lifetime);
+ /* add it after calling _setExpire */
+ $key = $this->_params['prefix'] . $key;
$result = xcache_get($key);
return empty($result)
---------
More information about the bugs
mailing list