Magento 2 Cache Issue – Page Content Not Refreshing

cachemagento2

I have developed a custom module the retrieve data from database and displayed in a block. The data is updated in database but the page is not showing the latest data if cached is enabled. If the cache is disabled, everything just works fine. Sometimes, even cannot get the customer ID from session if cache is enabled. How to resolve this issue?

Best Answer

Cacheable false should be avoid. It set complete as a non-cache if added false in layout

Related Topic