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)
|
||||
{
|
||||
$hash = $this->hashKey($key);
|
||||
// $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;
|
||||
$path = substr($hash, 0, 2) . DIRECTORY_SEPARATOR . substr($hash, 2, 2) . DIRECTORY_SEPARATOR . $hash;
|
||||
$full = $this->cacheDir . DIRECTORY_SEPARATOR . $this->poolName . DIRECTORY_SEPARATOR . $path;
|
||||
return $full;
|
||||
}
|
||||
|
||||
@ -125,12 +125,17 @@ class LocalCache implements CacheInterface
|
||||
*/
|
||||
public function clear()
|
||||
{
|
||||
/*
|
||||
$items = glob($this->cacheDir.DIRECTORY_SEPARATOR.$this->poolName.DIRECTORY_SEPARATOR."*.info");
|
||||
foreach ($items as $item) {
|
||||
unlink(substr($item, 0, -5));
|
||||
unlink($item);
|
||||
}
|
||||
@rmdir($this->cacheDir . DIRECTORY_SEPARATOR . $this->poolName);
|
||||
*/
|
||||
|
||||
$path = $this->cacheDir . DIRECTORY_SEPARATOR . $this->poolName;
|
||||
exec("rm -rf ".escapeshellarg($path));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user