mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-16 14:33:14 +00:00
Refactor Cache services
This commit is contained in:
@@ -22,10 +22,35 @@ use Doctrine\Common\Cache\ArrayCache as DoctrineArray;
|
||||
class ArrayCache extends DoctrineArray implements Cache
|
||||
{
|
||||
|
||||
public function flushAll()
|
||||
public function isServer()
|
||||
{
|
||||
$this->data = array();
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getStats()
|
||||
{
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function get($id)
|
||||
{
|
||||
if (!$this->contains($id))
|
||||
{
|
||||
throw new Exception(sprintf('Unable to find key %s', $id));
|
||||
}
|
||||
return $this->fetch($id);
|
||||
}
|
||||
|
||||
public function deleteMulti(array $array_keys)
|
||||
{
|
||||
foreach ($array_keys as $id)
|
||||
{
|
||||
$this->delete($id);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user