// Fixed CacheMemcache #PSFV-805

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14476 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
bMancone
2012-04-05 09:41:41 +00:00
parent 5b882d3467
commit a9f09e720c
+20 -7
View File
@@ -45,15 +45,28 @@ class CacheMemcacheCore extends Cache
{ {
$this->connect(); $this->connect();
// Get keys (this code come from Doctrine 2 project) // Get keys (this code comes from Doctrine 2 project)
$this->keys = array(); $this->keys = array();
foreach ($this->memcache->getExtendedStats('slabs') as $server => $slabs) $all_slabs = $this->memcache->getExtendedStats('slabs');
foreach ($all_slabs as $server => $slabs)
{
if (is_array($slabs)) if (is_array($slabs))
{
foreach (array_keys($slabs) as $slab_id) foreach (array_keys($slabs) as $slab_id)
if ($this->memcache->getExtendedStats('cachedump', (int)$slab_id)) {
foreach ($dump as $entries) $dump = $this->memcache->getExtendedStats('cachedump', (int)$slab_id);
foreach ($entries as $entry) if ($dump)
$this->keys[$entry] = 0; {
foreach ($dump as $entries)
{
if ($entries)
$this->keys = array_merge($this->keys, array_keys($entries));
}
}
}
}
}
} }
public function __destruct() public function __destruct()