I have store in Magento2 and planning to integrate varnish cache. Want to confirm if there is an issue with cacheable="false".
1 Answer 1
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-
https://trellis.co/blog/magento2-fpc-hole-punching/
You can also look into how to invalidate private content in magento devdocs here,
https://devdocs.magento.com/guides/v2.2/extension-dev-guide/cache/page-caching/private-content.html
as most of the times these contents are only the ones which we do not want cached.
EDIT:
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– Kul2018年11月14日 15:56:39 +00:00Commented Nov 14, 2018 at 15:56
-
1Please check edit.Vivek Kumar– Vivek Kumar2018年11月14日 16:02:15 +00:00Commented Nov 14, 2018 at 16:02
Explore related questions
See similar questions with these tags.