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
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.
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?