WordPress Caching

memcached-blog

WordPress Caching

We use Batcache (WordPress Caching) + Memcached Object Cache

Memcached Backend (Object Cache)

  • Caches queries, not page
  • Typical WordPress queries:
    • bloginfo() options (site title, description, language, theme stylesheet URL)
    • post or page title and contents
    • comments
    • sidebar widgets

Batcache

  • Store cached pages in memcached
  • Reduces disk I/O load

We touched on the use of batcache last we spoke. I would like to know as much as possible about how we have implemented batcache, issues encountered, solutions, as much as possible.

Batcache Implementation is fairly easy

  • Download latest version http://downloads.wordpress.org/plugin/batcache.1.0.zip-
  • Upload advanced-cache.php to the /wp-content/ directory
  • Add this line the top of wp-config.php to activate Batcache: define(‘WP_CACHE’, true);
  • Tweak the options near the top of advanced-cache.php
  • Optionally, upload batcache.php to /wp-content/plugins/ directory.
  • Issues encountered – none really, works as it is intended to.

XCACHE (Opcode Caching)

  • compiled PHP cache stored in memory
  • Alternatives available (eAccellerator and APC), XCACHE works best with PHP-FPM and WordPress

Leave a Comment

*