I have store in Magento2 and planning to integrate varnish cache. Want to confirm if there is an issue with cacheable="false".


cacheable="false" will disable caching for the entire page where it is included. So, it is highly recommended to not use it in blocks which are included in all pages.

To get around this, you will have to use cache hole punching.You can follow this blog post for the details-


You can also look into how to invalidate private content in magento devdocs here,


as most of the times these contents are only the ones which we do not want cached.


As magento excplicitly sends X-Magento-Cache-Control headers to no-cache when cacheable="false" , there will be no caching whether you are using Varnish,Fastly or Magento's default full page cache.

  • I know it will disable to cache entire page from full page but i want to know will it create issue with varnish cache?
    – Kul
    Nov 14 '18 at 15:56
  • Please check edit. Nov 14 '18 at 16:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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