- Added a small fix that suppresses warnings when no cache data exists.
This commit is contained in:
parent
d834f77b7e
commit
0b5a867bc7
@ -49,7 +49,7 @@ class ObjectStorageCache implements CacheInterface
|
|||||||
private function testTTL(string $key)
|
private function testTTL(string $key)
|
||||||
{
|
{
|
||||||
$meta = $this->provider->getItemMeta('fwcache_' . $key);
|
$meta = $this->provider->getItemMeta('fwcache_' . $key);
|
||||||
if ($meta['ttl'] > 0 && time() > $meta['time'] + $meta['ttl'])
|
if (!is_null($meta) && $meta['ttl'] > 0 && time() > $meta['time'] + $meta['ttl'])
|
||||||
$this->provider->deleteItem('fwcache_' . $key);
|
$this->provider->deleteItem('fwcache_' . $key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user