Skip to content

What it is

Memcached is an in-memory key-value store that caches small chunks of data in RAM to reduce database load and speed up dynamic applications.

Memcached is a free, open-source, high-performance distributed memory caching system. It stores small chunks of arbitrary data — strings, objects, HTML fragments, query results — in RAM, keyed by a string, and retrieves them in constant time. It is not a database: it does not persist, it does not guarantee that anything stays cached, and it does not care about durability. Its only job is to answer a key lookup fast, usually in under a millisecond, so the application can skip a slow backend (database, API, filesystem) that would take tens or hundreds of milliseconds.

Memcached was written in 2003 by Brad Fitzpatrick for LiveJournal, one of the first high-traffic social platforms. LiveJournal had a database that could not keep up with the site's read traffic. Fitzpatrick's insight was simple: most reads return the same data repeatedly, so cache the result of the first read and serve it from RAM to every subsequent request. That cache became Memcached, and it is still deployed in production at massive scale at Facebook, Wikipedia, Twitter, and thousands of other sites.