I'm running a WP site with WooCommerce and I want to do some caching. I'm going to exclude the pages such as the cart/checkout for obvious reasons however there are a couple of the things on the site I would like to stay dynamic and not be cached.
An example is the number of items in the cart and there's also a block of html that displays differently whether you're logged in or not.
So my question is, should I load these via AJAX or should I define them as fragments using mfunc? What are the advantages and benefits for each and which one is recommended for this task?