You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In 2.2.x, CoreShop\Bundle\CoreBundle\EventListener\RequestCartAvailability::checkCartAvailability will skip loading the cart in specific cases (like the route being _wdt, etc).
What would be useful here is to actually abstract this: allow developers to opt out of the cart requirement, meaning they could basically serve some requests without any database queries (if combined with #1803), this being an important property for very busy shops, for ESI fragments (Varnish) or requests which should be "realtime" (like search autocompletion).
The text was updated successfully, but these errors were encountered:
@dpfaffenbauer yes: currently there are some items which are fetched in event listeners, regardless if they'll be required or not, this also applies to #1803.
We should instead aim to fetch / set those things just in time, as in if we know for sure they'll be required. Maybe we have some factory based magic for the cart? Meaning we only fetch it if the code requests it to begin with?
Yes, this could be done in general for other listeners too. Generally, any expensive operation should be done after an (implicit or explicit) opt-in, not opt-out.
In 2.2.x,
CoreShop\Bundle\CoreBundle\EventListener\RequestCartAvailability::checkCartAvailability
will skip loading the cart in specific cases (like the route being_wdt
, etc).What would be useful here is to actually abstract this: allow developers to opt out of the cart requirement, meaning they could basically serve some requests without any database queries (if combined with #1803), this being an important property for very busy shops, for ESI fragments (Varnish) or requests which should be "realtime" (like search autocompletion).
The text was updated successfully, but these errors were encountered: