Re-enabled nesting
This commit is contained in:
parent
6ffc729cc7
commit
4a066dfd17
@ -54,8 +54,8 @@ class LocalCache implements CacheInterface
|
|||||||
protected function getKeyPath(string $key)
|
protected function getKeyPath(string $key)
|
||||||
{
|
{
|
||||||
$hash = $this->hashKey($key);
|
$hash = $this->hashKey($key);
|
||||||
// $path = substr($hash, 0, 2) . DIRECTORY_SEPARATOR . substr($hash, 2, 2) . DIRECTORY_SEPARATOR . $hash;
|
$path = substr($hash, 0, 2) . DIRECTORY_SEPARATOR . substr($hash, 2, 2) . DIRECTORY_SEPARATOR . $hash;
|
||||||
$full = $this->cacheDir . DIRECTORY_SEPARATOR . $this->poolName . DIRECTORY_SEPARATOR . $hash; // $path;
|
$full = $this->cacheDir . DIRECTORY_SEPARATOR . $this->poolName . DIRECTORY_SEPARATOR . $path;
|
||||||
return $full;
|
return $full;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -125,12 +125,17 @@ class LocalCache implements CacheInterface
|
|||||||
*/
|
*/
|
||||||
public function clear()
|
public function clear()
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
$items = glob($this->cacheDir.DIRECTORY_SEPARATOR.$this->poolName.DIRECTORY_SEPARATOR."*.info");
|
$items = glob($this->cacheDir.DIRECTORY_SEPARATOR.$this->poolName.DIRECTORY_SEPARATOR."*.info");
|
||||||
foreach ($items as $item) {
|
foreach ($items as $item) {
|
||||||
unlink(substr($item, 0, -5));
|
unlink(substr($item, 0, -5));
|
||||||
unlink($item);
|
unlink($item);
|
||||||
}
|
}
|
||||||
@rmdir($this->cacheDir . DIRECTORY_SEPARATOR . $this->poolName);
|
@rmdir($this->cacheDir . DIRECTORY_SEPARATOR . $this->poolName);
|
||||||
|
*/
|
||||||
|
|
||||||
|
$path = $this->cacheDir . DIRECTORY_SEPARATOR . $this->poolName;
|
||||||
|
exec("rm -rf ".escapeshellarg($path));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -173,4 +178,4 @@ class LocalCache implements CacheInterface
|
|||||||
$this->delete($key);
|
$this->delete($key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user