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

README.md

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).

Install

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

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

Example:

# Place in wp-config.php & adjust accordingly
function get_memcached_servers () {
    return array(
        '127.0.0.1:11211',
        '10.1.1.1:11211',
        'production.cache.amazonaws.com:11211'
    );
}

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 :)

License

GNU/GPL v2

Authors

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.