Close [x]

Use memcached for session storage

Edit this page on GitHub

Contents

Overview of memcached session storage

memcached is a general-purpose distributed memory caching system. It is often used to speed up dynamic database-driven websites by caching data and objects in RAM to reduce the number of times an external data source (such as a database or API) must be read. (Source: Wikipedia)

memcache provides a very large hash table that can be distributed across multiple machines. When the table is full, subsequent inserts cause older data to be purged in least recently used (LRU) order. The size of this hash table is often very large. (Source: memcached.org)

Magento uses memcached for session storage but not for page caching. For page caching, we recommend Redis or Varnish.

We recommend you use memcached for session storage. The Redis session handler in the phpredis PHP extension does not support session locking, which might cause issues with distributed systems and applications that rely on Ajax.

Next step