memcached - a distributed memory object caching system

What is Memcached?

Free & open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.

Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering.

Memcached is simple yet powerful. Its simple design promotes quick deployment, ease of development, and solves many problems facing large data caches. Its API is available for most popular languages.

Download Memcached

The latest stable memcached release is
release notes (2014-12-31)

Help Test Next Version!

LRU Improvements

The goal of this branch is a large improvement in memory efficiency. We are looking for testers and feedback of this branch. If you try it out, please contact the mailing list with any information on if your production hit ratios are improved (or not!). We would like to ship this soon in a new release. Thank you!

Quick Example

Cache Results

function get_foo(foo_id)
    foo = memcached_get("foo:" . foo_id)
    return foo if defined foo

    foo = fetch_foo_from_database(foo_id)
    memcached_set("foo:" . foo_id, foo)
    return foo

Play with telnet

$ telnet localhost 11211
Connected to localhost.
Escape character is '^]'.
get foo
VALUE foo 0 2
STAT pid 8861

Got a Question?


If you are curious about something, feel free to ask on the IRC channel - #memcached on freenode.


Many common questions are answered at the Memcached Wiki.


Please feel free to bug us on the memcached mailing list.

Need more information? Check out (and give feedback on!) The Wiki