Expand my Community achievements bar.

SOLVED

Cache with ecommerce

Avatar

Level 6

Hi,

How does the ecommerce add-on handles caching related to price.

As I read on documentation price is a kind of information that is always retrieved from the PIM. So, how does that works with dispatcher? there is no cache on products page?

Thanks,

1 Accepted Solution

Avatar

Correct answer by
Level 10

Product page is cached but not the variants. Price is varient & is not cached in file system.  However it is available through commerceSession api. 

It imports data from PIM & stores under /etc/commerce 

View solution in original post

4 Replies

Avatar

Correct answer by
Level 10

Product page is cached but not the variants. Price is varient & is not cached in file system.  However it is available through commerceSession api. 

It imports data from PIM & stores under /etc/commerce 

Avatar

Level 6

I see, but for example in this page:

http://localhost:4502/content/geometrixx-outdoors/en/equipment/hiking.html

It has a list of products and their prices.

So, as far as I know, usually this page will be cached by dispatcher. In case the product price is changed, there will be a request for all pages where the product is used to clear the cache? Or those pages where products are displayed usually are not cached?

Thanks.

Avatar

Level 10

Page will be cached & no need to clear the cache to get latest price. Price will be calculated & internally uses commerce session.

Avatar

Level 6

Hi Sham,

I didn't understand. When the page is requested, dispatcher caches the html returned, including the price that was retrieve from ecommerceSession. So, next time the page is requested, it will return this HTML. What if the price was changed? This entire HTML should be generated again, right? So, how does the cache should not be cleared?

Thanks