0

Refering to this piece of docs: http://devdocs.magento.com/guides/v2.1/config-guide/cache/cache-priv-priv.html, is it possible to put some private content into page which is public and it will not make whole page not cacheable? In other words to reload only PART of page dynamically, not invalidating a cache? Is it the way from docs above?

  • Can use cacheable="false" in ur xml file – Ankit Shah Jan 20 '17 at 2:21
  • but it will make whole page not cacheable – Bartosz Kubicki Jan 20 '17 at 7:18
  • Correct. Using cacheable=false is absolutely not the right solution. Do not use this, because it will disable Full Page Caching for the entire page! – Jisse Reitsma Jul 15 '17 at 10:21
2

For generate customer private data you need to use CustomerData sections and rendering private html content on client side using data, provided by CustomerData sections or loaded via AJAX, as described in the DevDocs.

There are some modules, which successfully use this mechanism:

  • Wishlist
  • Product Compare
  • Sales
  • Checkout
  • Review
  • I know - I heav read it - my question is - if inserting some private content into public-content page makes it entire not cacheable – Bartosz Kubicki Jan 20 '17 at 15:10
  • 2
    magento application doesn't know which content is private and which is public. If you have placed any private content on the cacheable page, then content will be cached. You need to take care of this self (by using customer data). – Max Jan 20 '17 at 15:17

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.