mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-27 20:48:46 +02:00
⬆️ N°4770 Update to latest Symfony 3.4
This commit is contained in:
9
lib/symfony/cache/Adapter/ProxyAdapter.php
vendored
9
lib/symfony/cache/Adapter/ProxyAdapter.php
vendored
@@ -29,6 +29,7 @@ class ProxyAdapter implements AdapterInterface, PruneableInterface, ResettableIn
|
||||
private $namespaceLen;
|
||||
private $createCacheItem;
|
||||
private $poolHash;
|
||||
private $defaultLifetime;
|
||||
|
||||
/**
|
||||
* @param string $namespace
|
||||
@@ -40,11 +41,11 @@ class ProxyAdapter implements AdapterInterface, PruneableInterface, ResettableIn
|
||||
$this->poolHash = $poolHash = spl_object_hash($pool);
|
||||
$this->namespace = '' === $namespace ? '' : CacheItem::validateKey($namespace);
|
||||
$this->namespaceLen = \strlen($namespace);
|
||||
$this->defaultLifetime = $defaultLifetime;
|
||||
$this->createCacheItem = \Closure::bind(
|
||||
static function ($key, $innerItem) use ($defaultLifetime, $poolHash) {
|
||||
static function ($key, $innerItem) use ($poolHash) {
|
||||
$item = new CacheItem();
|
||||
$item->key = $key;
|
||||
$item->defaultLifetime = $defaultLifetime;
|
||||
$item->poolHash = $poolHash;
|
||||
|
||||
if (null !== $innerItem) {
|
||||
@@ -155,8 +156,8 @@ class ProxyAdapter implements AdapterInterface, PruneableInterface, ResettableIn
|
||||
}
|
||||
$item = (array) $item;
|
||||
$expiry = $item["\0*\0expiry"];
|
||||
if (null === $expiry && 0 < $item["\0*\0defaultLifetime"]) {
|
||||
$expiry = time() + $item["\0*\0defaultLifetime"];
|
||||
if (null === $expiry && 0 < $this->defaultLifetime) {
|
||||
$expiry = time() + $this->defaultLifetime;
|
||||
}
|
||||
|
||||
if ($item["\0*\0poolHash"] === $this->poolHash && $item["\0*\0innerItem"]) {
|
||||
|
||||
Reference in New Issue
Block a user