$cart =
$content['compressed'
] ? CacheValueCompressor::
uncompress($content['payload'
]) :
unserialize((string) $content['payload'
]);
if (!
$cart instanceof Cart
) { throw CartException::
deserializeFailed();
} $cart->
setToken($token);
$cart->
setRuleIds(json_decode((string) $content['rule_ids'
], true, 512, \JSON_THROW_ON_ERROR
) ??
[]);
$this->eventDispatcher->
dispatch(new CartLoadedEvent($cart,
$context));
return $cart;
} /**
* @throws InvalidUuidException
*/
public function save(Cart
$cart, SalesChannelContext
$context): void
{ if ($cart->
getBehavior()?->
isRecalculation()) { return;
}