foreach ($adapters as $adapter) { if (!
$adapter instanceof CacheItemPoolInterface
) { throw new InvalidArgumentException(sprintf('The class "%s" does not implement the "%s" interface.',
get_debug_type($adapter), CacheItemPoolInterface::
class));
} if (\
in_array(\PHP_SAPI,
['cli', 'phpdbg'
], true
) &&
$adapter instanceof ApcuAdapter && !
filter_var(\
ini_get('apc.enable_cli'
), \FILTER_VALIDATE_BOOL
)) { continue; // skip putting APCu in the chain when the backend is disabled
} if ($adapter instanceof AdapterInterface
) { $this->adapters
[] =
$adapter;
} else { $this->adapters
[] =
new ProxyAdapter($adapter);
} } $this->adapterCount = \
count($this->adapters
);
$this->defaultLifetime =
$defaultLifetime;
self::
$syncItem ??= \Closure::
bind( static function D
$sourceItem,
$item,
$defaultLifetime,
$sourceMetadata = null
) { $sourceItem->isTaggable = false;
$sourceMetadata ??=
$sourceItem->metadata;
$item->value =
$sourceItem->value;