user12806152
user12806152

Reputation: 15

Product data not updated

We observe some behavior of Spartacus (Version 1.4), which we find irritating. It could be that Spartacus works fine, but that we lack some understanding of Spartacus. Let me explain some issues which we observe.

Issue 1: * I go to the product listing page, select a product, which is the LAST ONE in stock and buy it.
If i go back to product detail page, i can still buy the product. The product information wasn't updated/reloaded.
If Spartacus loads a product, it remain in cache for a very long time. But in the mean time, the stock information or the price might have been changed.

Issue 2: We have separate prices for B2C and B2B Customers.
I log on into Spartacus as a (B2C)Customer and load product detail page and let me show product details.
I log off and log in as a B2B Customer, load the product detail page and still see the price as shown previously to the B2C Customer.
The product data and product price wasn't updated. The prices on product listing page are also not the ones i would expect.
If a take a different browser and log in there as B2B Customer then the correct prices will be shown - at least on product detail page.

Do i have to instruct Spartacus to clear the cache (caching strategy/is there any?) or is there a way to enforce to reload the product data any time i visit the product detail page?

Thank you in advance.

Upvotes: 0

Views: 501

Answers (1)

Marcin Lasak
Marcin Lasak

Reputation: 226

We don't have mechanism that would do that automatically after each action that could affect the product page (checkout, login, etc.)

However there is one thing that might come handy: https://sap.github.io/spartacus-docs/loading-scopes/#defining-maxage-for-the-scope

You could set loading scopes to low values which could practically disable caching.

Upvotes: 1

Related Questions