feat: cache frontpage products and categories

This commit is contained in:
2025-08-08 15:02:21 +03:00
parent 2fb841ef08
commit 5f785e82e6
7 changed files with 598 additions and 44 deletions

View File

@@ -74,7 +74,7 @@ async function loadMore() {
productsStore.isLoading = true;
try {
const response = await productsStore.fetchProducts(categoryId, productsStore.page);
const response = await productsStore.fetchProducts(categoryId, productsStore.page, true);
productsStore.hasMore = response.meta.hasMore ?? false;
productsStore.products.data.push(...response.data);
productsStore.products.meta.currentCategoryName = response.meta.currentCategoryName;