src/Psr6MemoryCache.php
public function save(\Psr\Cache\CacheItemInterface $item)
    {
        $key = $item->getKey();
        $val = $item->get();
        if (is_object($val)) {
            $val = clone $val;
        }

        if (!($item instanceof \WildWolf\Cache\CacheItem)) {
            $expires = null;
        } else {
            $expires = $item->expires();
        }

        $this->cache[$key] = [$val, $expires];
        return true;
    }
public function save(\Psr\Cache\CacheItemInterface $item)
    {
        $key = $item->getKey();
        $val = $item->get();
        if (is_object($val)) {
            $val = clone $val;
        }

        if (!($item instanceof \WildWolf\Cache\CacheItem)) {
            $expires = null;
        } else {
            $expires = $item->expires();
        }

        $this->cache[$key] = [$val, $expires];
        return true;
    }
Persists a cache item immediately.

@param \Psr\Cache\CacheItemInterface $item
The cache item to save.

@return bool
True if the item was successfully persisted. False if there was an error.