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