Just wondering if anyone else has come across this issue as I’m pulling my hair out with this one.
We have a plug-in which redirects customers to the category page when they attempt to view a disabled product.
This redirect includes adding a message about the product no longer being available which is built using the standard messageManager.
However, when cache is enabled this message doesn’t appear on the category page the customer redirects to and instead appears after the customer clicks a different product and is taken to this products details page.
I can only assume that because the category page is loading from cache that the customer session isn’t being updated with the message to display?
How can I force a cache refresh on the category page? I don’t really want to set the messageManager block to no_cache as this then disables the full page cache on category pages completely.