This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
Make the Mini Cart block cache-friendly #9353
Labels
block: mini-cart
Issues related to the Mini-Cart block.
type: enhancement
The issue is a request for an enhancement.
Currently, if a store wants to use page caching, the Mini Cart block can show outdated totals or even totals from other sessions. We would like to fix that so stores can enable page caching without problems even when having the Mini Cart block in their page.
See also #7530.
To reproduce
Expected behavior
Mini Cart should always show the correct totals, even if caching is enabled.
Approach
In order to solve that, we would like to:
3.1. We would check if the user has some cart data in their local storage. If it does, we will use it to fill Mini Cart block details.
3.2. In addition to the previous step, we will make a query to the Store API to gather the cart values and will update them in the Mini Cart button. We will save these values into the user local storage.
The text was updated successfully, but these errors were encountered: