Cache\Adapter\Predis\PredisCachePool::storeItemInCache PHP Метод

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

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