$shopId =
$this->
get('shop'
)->
getId();
if (!
$cacheControl->
isCacheableRoute($this->request
)) { return false;
} if ($cacheControl->
useNoCacheControl($this->request,
$this->response,
$shopId)) { $this->response->headers->
set('cache-control', 'private, no-cache', true
);
return false;
} $cacheTime =
(int) $cacheControl->
getCacheTime($this->request
);
$this->request->
setParam('__cache',
$cacheTime);
$this->response->headers->
set('cache-control', 'public, max-age=' .
$cacheTime . ', s-maxage=' .
$cacheTime, true
);
$noCacheTags =
$cacheControl->
getNoCacheTagsForRequest($this->request,
$shopId);
if (!
empty($noCacheTags)) { $this->response->headers->
set('x-shopware-allow-nocache',
implode(', ',
$noCacheTags), true
);
} $cacheCollector =
$this->
get('http_cache.cache_id_collector'
);