feat: automatic localstorage cleaning

This commit is contained in:
imperosol
2026-05-11 13:16:37 +02:00
parent 35aca2b3b2
commit 35d4465d47
5 changed files with 89 additions and 2 deletions
@@ -7,8 +7,7 @@ interface BasketItem {
unitPrice: number;
}
// increment the key number if the data schema of the cached basket changes
const BASKET_CACHE_KEY = "basket1";
const BASKET_CACHE_KEY = "basket";
document.addEventListener("alpine:init", () => {
Alpine.data("basket", (lastPurchaseTime?: number) => ({