1) Check the items inside customer wishlist section.
require(['Magento_Customer/js/customer-data'], function(customerData){ var wishlist = customerData.get('wishlist')(); //console.log('debug', wishlist); if(wishlist.items) { var wishlistItems = wishlist.items; for (var i = 0; i < wishlistItems.length; i++) { var product = wishlistItems[i]; console.log(product.product_name); console.log(product.image); } } });
2) Check ‘mage-cache-storage’ cookie to get all customerData value
CustomerData works with the data stored on the client side. Magento 2 sections are merged parts of customer data. They allow keeping this data up-to-date via a sync with the web server. Every section is a key in magento-cache-storage, while magento-cache-storage is the key in localStorage.
Or you can just view the CustomerData with Url: {store_url}/customer/section/load/?sections=[custom_section_name]. Replace [customer_section_name] with real name, wishlist, cart…
Just copy&paste the following statement into web browser console.
JSON.parse(localStorage.getItem('mage-cache-storage'));
3) Force to reload the some customer sections, for example ‘wishlist’
4) Find all xml files with ‘cacheable=”false”’
If this attribute found inside default.xml, then the whole website is not cacheable.
grep -rnw 'app/' -e 'cacheable="false"'