Recently Viewed Not Showing Up with Full Page Cache Enabled – Magento 2 Fix

blocksfull-page-cachemagento-2.0.7productxml

The only solution i found so far is to add cacheable="false" to recently_viewed block in xml, but this did not work. Is there any other way to force magento show "Recently Viewed" block on product page when Full Page Cache is enable?

Best Answer

This is a known issue with Magento 2, the issue can be tracked on GitHub here.

I believe the block will need 'hole punching' through the cache, there are some answers on how to disable the cache per block here and here There is also some related info on the dev docs here.

Be careful using cacheable="false" as it will prevent the whole page from being cached (this may be changed in a future update, if so please update this answer and remove this paragraph).

Related Topic