Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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?


share|improve this question
Good question, have you found any answer for it somewhere? Thank you. –  Marvin3 May 12 '13 at 9:29
How many hits do you get on the site? –  Brian Fegter Sep 10 '13 at 5:52

1 Answer 1

I'm not a friend of link only answers, but as I can't bind the whole source code + explanation in here, I'll just leave a link to @Rarst Fragment Cache Plugin.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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