Commerce caching and caching invalidation

Vote:
 

We have a 3rd party caching solution where we cache our product page.  This product page is also inherently using epi caching out of the box.  We'd like to extend the amount of time we cache a product page in the 3rd part solution, however we need to ensure epi cache is cleared as well. 

My question is, when we run a product import and a cached product is changed in any way is that cache invalidated right away or is it still going to wait for it's assigned expiration?

Thanks

#203560
Apr 26, 2019 21:22
Vote:
 

haven't changed the code, but it sounds logical to invalidate cache entry right away and not wait till the expiration, otherwise - old (cached) version is served

#203564
Apr 27, 2019 6:30
Vote:
 

Hi Todd

As long as you use the official interfaces for creating and updating the Commerce content nodes and entries, you should be safe.

I believe the internals take care of the invalidation of cached versions upon persisting updates. At least that’s my experience.

That’s the internal object caching. It sounds like you also do external output caching. If that’s the case you probably also need to communicate cache invalidation to that output cache.

#203565
Apr 27, 2019 7:38
Vote:
 

As a rule of thumb we would like the caching of framework objects transparent for you, i.e. you don't have to invalidate the cache yourself, as long as you use the public APIs instead of underlying data access directly (which is usually a big no no)

#203566
Apr 27, 2019 7:41
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.