5

I'm reading this article about fragment caching. It seems self explanatory except for this line:

based on the assumption that you have an advanced object cache available.

What exactly is an advanced object cache, and how can I check for one/implement if not already available?

2

An advanced object cache is a cache mechanism that can store data that persists beyond a single request. A couple of popular object caches for WordPress are APC and Memcached. The WP_Object_Cache class Codex page has a list of links with more info on advanced cache options.

  • So it's my understanding that using an advanced object cache like APC or Memcached are alternatives to using transients. Is this correct? Grossly oversimplified? – psorensen Feb 2 '15 at 19:41
  • 1
    It's not necessarily an alternative, though it may remove the need for transients. The Transients API will use an object cache if it is available and configured via the WP_Object_Cache class, so it's not an either/or. – Milo Feb 2 '15 at 19:59
  • 2
    It's important to note that Zend's OpCache is bundled with PHP 5.5 and APC has major problems on versions above 5.5 and work in it has ceased. – Wyck Feb 3 '15 at 3:02
5

Without an advanced cache PHP execution looks like this:

enter image description here

With an advanced cache PHP's execution looks like this:

enter image description here

As you can see reading from memory is faster, much like on a personal computer when playing a game,

Images cutesy of engineyard.com

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.