APC Object Cache provides a persistent memory-based backend for the WordPress object cache. APC must be available on your PHP install.
An object cache is a place for WordPress and WordPress extensions to store the results of complex operations. On subsequent loads,
this data can be fetched from the cache, which will be must faster than dynamically generating it on every page load.
The APC Object Cache backend is also compatible with Batcache, the powerful full page caching engine that runs on WordPress.com
Be sure to read the installation instructions, as this is not a traditional plugin, and needs to be installed in a specific location.
Latest version: Download APC Object Cache Backend v2.0.6 [zip]
This plugin has been downloaded 27198 times.
- Verify that you have PHP 5.2.4+ and a compatible APC version installed.
object-cache.phpto your WordPress content directory (
Q. Does this work as a backend for Batcache?
A. Yes! APC 3.1.1+ supports incrementers and handles its own cleanup of expired objects, so it works just fine for Batcache. Lower versions of APC will work, but the hits trigger will be disabled.
Q. Does this support versions of WordPress earlier than 3.3?
A. Maybe, but I’m not going to support them, and you shouldn’t still be running them!
Q. I share `wp-config.php` among multiple WordPress installs. How can I guarantee key uniqueness?
WP_APC_KEY_SALT to something that is unique for each install (like an md5 of the MySQL host, database, and table prefix).
- Fixed a PHP notice
- Degrades to the built-in PHP-memory cache when APC is not available (now plays with WP-CLI)
- Clone objects before storing them to the local cache, so changes to them don’t corrupt the cache
- Clear the local PHP memory cache when the APC cache is cleared
die()when people mistakenly try to activate this as a plugin, and provide a helpful message for where they should move the file
- Parity with the Memcache backend, as much as was possible
- Object cloning
- Requires WP 3.1+
- Fix double-equals vs triple-equals bug with boolean true values
- Perform the
md5( ABSPATH )calculation once per load (props jdub)
- Allow users of complex
wp-config.phpsetups to define
WP_APC_KEY_SALTto guarantee key uniqueness (props jdub)
- Lose the
- Rename the
incr2and then conditionally add
incrvia class extension (so that Batcache can properly detect incrementor support)
- Convert arrays to ArrayObject objects (APC does not cache multi-level arrays or arrays of objects, so this works around that)
- Require PHP 5.2+
- Fixed bugs in wp_cache_delete()
- First version in SVN
- Updated to support increment/decrement and feature parity with the Memcached backend (except for multiget support)