Cache\Adapter\Redis\RedisCachePool::storeItemInCache PHP Метод

storeItemInCache() защищенный Метод

protected storeItemInCache ( Psr\Cache\CacheItemInterface $item, $ttl )
$item Psr\Cache\CacheItemInterface
    protected function storeItemInCache(CacheItemInterface $item, $ttl)
    {
        $key = $this->getHierarchyKey($item->getKey());
        $data = serialize([true, $item->get(), $item->getTags()]);
        if ($ttl === null || $ttl === 0) {
            return $this->cache->set($key, $data);
        }
        return $this->cache->setex($key, $ttl, $data);
    }