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();
}