[limb-svn] r6932 - in 3.x/trunk/limb/cache: src tests/cases
svn at limb-project.com
svn at limb-project.com
Mon Apr 14 19:27:29 MSD 2008
Author: alex433
Date: 2008-04-14 19:27:29 +0400 (Mon, 14 Apr 2008)
New Revision: 6932
URL: http://fisheye.limb-project.com/changelog/limb/?cs=6932
Modified:
3.x/trunk/limb/cache/src/lmbCacheGroupDecorator.class.php
3.x/trunk/limb/cache/tests/cases/lmbCacheGroupDecoratorTest.class.php
Log:
Fix lmbCacheGroupDecorator. Now it stores groups in cache after each action instead of storing in the destructor
Modified: 3.x/trunk/limb/cache/src/lmbCacheGroupDecorator.class.php
===================================================================
--- 3.x/trunk/limb/cache/src/lmbCacheGroupDecorator.class.php 2008-04-14 14:23:06 UTC (rev 6931)
+++ 3.x/trunk/limb/cache/src/lmbCacheGroupDecorator.class.php 2008-04-14 15:27:29 UTC (rev 6932)
@@ -36,10 +36,12 @@
if (!$this->_groupKeyExists($key, $group))
$this->_groups[$group][] = $key;
-
+
+ $this->_cache->set('groups', $this->_groups);
+
return $result;
}
-
+
function set($key, $value, $params = array())
{
$group = $this->_getGroup($params);
@@ -47,7 +49,9 @@
if (!$this->_groupKeyExists($key, $group))
$this->_groups[$group][] = $key;
-
+
+ $this->_cache->set('groups', $this->_groups);
+
return $result;
}
@@ -76,12 +80,14 @@
$this->_cache->delete($this->_generateKey($key, $group));
unset($this->_groups[$group]);
+ $this->_cache->set('groups', $this->_groups);
}
function flush()
{
$this->_cache->flush();
$this->_groups = array();
+ $this->_cache->set('groups', $this->_groups);
}
function stat($params = array())
Modified: 3.x/trunk/limb/cache/tests/cases/lmbCacheGroupDecoratorTest.class.php
===================================================================
--- 3.x/trunk/limb/cache/tests/cases/lmbCacheGroupDecoratorTest.class.php 2008-04-14 14:23:06 UTC (rev 6931)
+++ 3.x/trunk/limb/cache/tests/cases/lmbCacheGroupDecoratorTest.class.php 2008-04-14 15:27:29 UTC (rev 6932)
@@ -64,5 +64,8 @@
$var = $this->cache->get($key);
$this->assertEqual($var, $v1);
}
+
+ //skip specific fileBackend test
+ function testCachedDiskFiles(){}
}
More information about the limb-svn
mailing list