Memcached is a simple in-memory object store well-suited for application level caching.
Both Memcached and Redis can be used for application caching. As a general rule, Memcached is simpler and thus more widely supported while Redis is more robust. We recommend using Redis if possible but Memcached is fully supported if an application favors that cache service.
To use it in your application, add it to
1 2 3
memcached: # supported versions: 1.4, 1.5, 1.6 type: memcached:1.6
And wire it in
1 2 3 4 5 6 7
relationships: cache: "memcached:memcached" # needed to install the PHP extension runtime: extensions: - memcached
The configuration is exposed via the following environment variables (where
CACHE is the upper-cased version of the key defined in the relationship
This work, including the code samples, is licensed under a Creative Commons BY-SA 3.0 license.