Trigger the invalidation of a page cache

69 Views Asked by At

I'd like to trigger (either via java code or via pipeline) the invalidation of a product page cache. I don't want to invalidate all the caches in the domain, but just for a given page. Is that possible ?

I tried to look at the PageCacheMgrImpl class but did not found the best method. Need a help please.

2

There are 2 best solutions below

0
On

There is (or was) a pipelet InvalidatePageCache which you can check for various examples if you want to do it via Java code. If you just want to perform a page cache invalidation with a pipelet, you can use this one right away.

0
On

Just for completeness: You would need to define ISCACHEKEY (https://support.intershop.com/kb/index.php/Display/24746A) in your ISML and if you call pageCacheMgr.invalidateKeywords(site, searchwordsArray); this should invalidate the page cache for this page.