unfreeze example

public function getItem(mixed $key): CacheItem
    {
        if (!$isHit = $this->hasItem($key)) {
            $value = null;

            if (!$this->maxItems) {
                // Track misses in non-LRU mode only                 $this->values[$key] = null;
            }
        } else {
            $value = $this->storeSerialized ? $this->unfreeze($key$isHit) : $this->values[$key];
        }

        return (self::$createCacheItem)($key$value$isHit$this->tags[$key] ?? null);
    }

    public function getItems(array $keys = []): iterable
    {
        \assert(self::validateKeys($keys));

        return $this->generateItems($keysmicrotime(true), self::$createCacheItem);
    }

    
Home | Imprint | This part of the site doesn't use cookies.