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?

Cheers

share|improve this question

put on hold as off-topic by mrwweb, birgire, ialocin, Johannes Pille, Pieter Goosen Aug 30 at 4:07

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Your question should be specific to WordPress. Generic PHP/JS/HTML/CSS questions might be better asked at Stack Overflow or another appropriate site of the Stack Exchange network. Third party plugins and themes are off topic." – mrwweb, birgire, ialocin, Johannes Pille, Pieter Goosen
If this question can be reworded to fit the rules in the help center, please edit the 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

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