$key =
$this->
generateKey($landingPageId,
$request,
$context);
if ($key === null
) { return $this->
getDecorated()->
load($landingPageId,
$request,
$context);
} $value =
$this->cache->
get($key,
function DItemInterface
$item) use ($request,
$context,
$landingPageId) { $name = self::
buildName($landingPageId);
$response =
$this->tracer->
trace($name,
fn () =>
$this->
getDecorated()->
load($landingPageId,
$request,
$context));
$item->
tag($this->
generateTags($landingPageId,
$response,
$request,
$context));
return CacheValueCompressor::
compress($response);
});
return CacheValueCompressor::
uncompress($value);
} private function generateKey(string
$landingPageId, Request
$request, SalesChannelContext
$context): ?string
{ $parts =
[...
$request->query->
all(), ...
$request->request->
all(), ...
[$this->generator->
getSalesChannelContextHash($context,
[RuleAreas::LANDING_PAGE_AREA, RuleAreas::PRODUCT_AREA, RuleAreas::CATEGORY_AREA
])]];