CacheItem::
log($this->logger, 'Failed to check if key "{key}" is cached: '.
$e->
getMessage(),
['key' =>
$key, 'exception' =>
$e, 'cache-adapter' =>
get_debug_type($this)]);
return false;
} } public function clear(string
$prefix = ''
): bool
{ $this->deferred =
[];
if ($cleared =
$this->versioningIsEnabled
) { if ('' ===
$namespaceVersionToClear =
$this->namespaceVersion
) { foreach ($this->
doFetch([static::NS_SEPARATOR.
$this->namespace
]) as $v) { $namespaceVersionToClear =
$v;
} } $namespaceToClear =
$this->namespace.
$namespaceVersionToClear;
$namespaceVersion = self::
formatNamespaceVersion(mt_rand());
try { $e =
$this->
doSave([static::NS_SEPARATOR.
$this->namespace =>
$namespaceVersion], 0
);
} catch (\Exception
$e) { } if (true !==
$e &&
[] !==
$e) { $cleared = false;