I am trying to make product view block non cacheable so that on depending upon cart item count i can dynamically show some messages to user. The message is properly displaying when full page cache is disabled but not working when full page cache is enabled. I am using magento 2.1.8.

1 Answer 1


I would recommend taking a look at http://devdocs.magento.com/guides/v2.3/extension-dev-guide/cache/page-caching/public-content.html

of your could add

If content of your block is dynamic then you should mark block as $_isScopePrivate = true. and block will be deliver over Ajax.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.