0

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?

asked Aug 15, 2016 at 13:44
1

3 Answers 3

1

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

answered Oct 15, 2018 at 13:34
0

I finally find out that if we need to get current customer session in a block, cacheable must be set to false in the layout xml.

answered Sep 22, 2016 at 10:53
0

Magento used cacheable="false" in OOTB layout.

If page is independent then recommend to use cacheable="false". Also avoid to add cacheable="false" in default.xml layout.

Shoaib Munir
9,59210 gold badges54 silver badges109 bronze badges
answered Jun 25, 2019 at 13:46

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.