[-] Classes : fixed cachefs and memcache classes #PSCFV-5225 thanks @prestalab
This commit is contained in:
Vendored
+1
-1
@@ -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;
|
||||||
|
|||||||
Vendored
+1
@@ -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].'/';
|
||||||
|
|||||||
Vendored
+3
-2
@@ -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];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user