Magento Memcached

Make Magento Memcached super easy with Redis Enterprise

Using Memcached with Magento

Magento can use Memcached both as a cache and as a session storage. We recommend you use a different Memcached bucket for each purpose.

To use Memcached as a cache and as a session storage for your Magento site, follow these steps:

  1. Make sure that your Magento server is installed with libmemcached and the PECL memcached extension.
  2. Log into Magento’s administration console and set default value of the Cookie Lifetime in the Magento Session Cookie Management to 31536000 in order to comply with following Memcached protocol specification about expiration times:

    Some commands involve a client sending some kind of expiration time
    (relative to an item or to an operation requested by the client) to
    the server. In all such cases, the actual value sent may either be
    Unix time (number of seconds since January 1, 1970, as a 32-bit
    value), or a number of seconds starting from current time. In the
    latter case, this number of seconds may not exceed 606024*30 (number
    of seconds in 30 days); if the number sent by a client is larger than
    that, the server will consider it to be real Unix time value rather
    than an offset from current time.

  3. Edit your site’s XML file, typically located at app/etc/local.xml, and add the following to the <global> block:
     <session_cache_limiter></session _cache_limiter>

    To modify these settings so that your Memcached buckets are used:

    • Replace hostname1 with the hostname of your sessions bucket
    • Replace port1 with the port of your sessions bucket
    • Replace hostname2 with the hostname of your cache bucket
    • Replace port2 with the port of your cache bucket
      Displaying Memcached Howto –

Redis Enterprise enables running Memcached buckets in a highly available and auto-scalable manner, with predictable top performance.

Redis Enterprise Software lets you install an enterprise grade Memcached cluster in your environment of choice, whether an on-premises data-center or your preferred cloud platform. It gives you full control of your data and configuration – no clustering or sharding knowledge required!

Memcached Cloud is a fully managed cloud service for hosting and running Memcached datasets in a highly available and scalable manner, with predictable and stable top performance. It provides a storage engine for standard Memcached, as well as in-memory replication and instant auto-failover within the same data center or across data centers. The service completely frees developers from dealing with nodes, clusters, scaling, data persistence issues or failure recovery.

For more information on using Redis’ products and services with Magento please see the Howto page.