Memcached is a multithreaded, event-driven memory cache for small arbitrary values, meant to sit in a distributed deployment and ease load on databases and backends.
Overview
Memcached provides a network-accessible in-memory key-value store for short-lived data such as strings and serialized objects. It is generic but aimed at speeding dynamic web applications by holding hot results from databases, APIs, or page rendering so repeated work avoids slower backends.
The server uses a simple protocol and multithreaded event handling so many clients can read and write concurrently. Client libraries exist for most popular languages, which keeps integration straightforward for application code that treats the cache as an external service.
Operators can build from release tarballs with standard configure and make steps, optionally enabling OpenSSL for TLS or an experimental proxy mode with extra build steps. Optional libseccomp on Linux can restrict the process for hardened deployments. After building from a git checkout, the binary in the build tree can be started directly and probed with telnet for basic commands.
Documentation, wikis, mailing lists, and community chat channels cover deployment patterns, troubleshooting, and development. The design favors quick rollout and operational simplicity over persistence: data lives in RAM and swapping should be avoided when locking memory for large caches.
Key features
- In-memory key-value storage
- Multithreaded event server
- Distributed client usage
- Optional TLS via OpenSSL
- Optional Linux seccomp hardening
- Text protocol and telnet debugging
- Language client ecosystem
- Tarball and git builds
Use cases
- Database query result caching
- Session or fragment caching
- API response memoization
- Reducing backend read load