Skip to content
Object cache driver for Memcached in WordPress (based on Memcached Redux)
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE Initial commit Jun 9, 2018 Update Jun 9, 2018
object-cache.php Add WP_CACHE_KEY_SALT to avoid cache conflicts Jul 4, 2018

WP Memcached Object Cache

Object cache driver for Memcached in WordPress.

Based on Memcached Redux with fixes for closing Memcached connections and an option to have multiple Memcached backends (defined as an array in wp-config.php).


Upload this file to your WordPress site's /wp-content/ folder.

Setup multiple Memcached backends by defining them in wp-config.


# Place in wp-config.php & adjust accordingly
function get_memcached_servers () {
    return array(

Any WordPress caching plugin that offers in-memory object caching (e.g. WP Rocket) can now utilize this object cache driver to store cache objects in Memcached backends.

Enjoy :)




Big thanks to Fotis Alexandrou for patching and extending Memcached Redux (which uses code from Scott Taylor, Ryan Boren, Denis de Bernardy, Matt Martz, Mike Schroder, Mika Epstein). Silence is not golden m/f.

You can’t perform that action at this time.