mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 07:23:13 +00:00
Replicate contains/fetch pattern in traceable cache for accuracy
This commit is contained in:
@@ -264,6 +264,10 @@ class TraceableCache implements Cache, PhraseaCache
|
|||||||
*/
|
*/
|
||||||
public function get($key)
|
public function get($key)
|
||||||
{
|
{
|
||||||
|
if ( ! $this->contains($key)) {
|
||||||
|
throw new Exception('Unable to retrieve the value');
|
||||||
|
}
|
||||||
|
|
||||||
return $this->fetch($key);
|
return $this->fetch($key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user