[-] Classes : fixed cachefs and memcache classes #PSCFV-5225 thanks @prestalab

This commit is contained in:
gRoussac
2013-07-11 18:27:54 +02:00
parent 293d1afbc7
commit a5ee2c2f4f
3 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -144,7 +144,7 @@ abstract class CacheCore
*/ */
public function set($key, $value, $ttl = 0) public function set($key, $value, $ttl = 0)
{ {
if ($this->_set($key, $value)) if ($this->_set($key, $value, $ttl))
{ {
if ($ttl < 0) if ($ttl < 0)
$ttl = 0; $ttl = 0;
+1
View File
@@ -149,6 +149,7 @@ class CacheFsCore extends Cache
*/ */
protected function getFilename($key) protected function getFilename($key)
{ {
$key = md5($key);
$path = _PS_CACHEFS_DIRECTORY_; $path = _PS_CACHEFS_DIRECTORY_;
for ($i = 0; $i < $this->depth; $i++) for ($i = 0; $i < $this->depth; $i++)
$path .= $key[$i].'/'; $path .= $key[$i].'/';
+3 -2
View File
@@ -65,8 +65,9 @@ class CacheMemcacheCore extends Cache
{ {
foreach ($dump as $entries) foreach ($dump as $entries)
{ {
if ($entries) if($entries)
$this->keys = array_merge($this->keys, array_keys($entries)); foreach ($entries as $key => $data)
$this->keys[$key] = $data[1];
} }
} }
} }