A high performance multithreaded event-based key/value cache store intended to be used in a distributed system.
open sourceBSD-3-Clauseself-hostablefree
Memcached is an in-memory key/value cache: a multithreaded, event-based server (on libevent) that applications use to keep rendered pages, query results and other computed values close at hand. Clients spread keys across several servers themselves; the servers don't talk to each other. It evicts the least recently used items when memory is full, and can be built with TLS support.
Ways to install
Package managers
Problems it solves
- cache rendered pages and search results in memory shared by several web servers
- my app is content heavy and the database is doing the same work for every request
- a simple shared cache that evicts old entries on its own when memory is full
- a cache server for several app processes that's fine to lose: nothing in it needs to survive a restart
Features
- multithreaded, event-based server
- key/value cache in memory
- LRU eviction
- optional TLS
Alternatives
The same job
These do what Memcached does.
- Dragonfly The world's most efficient in-memory data store
- Redis The preferred, fastest, and most feature-rich cache, data structure server, and document and vector query engine
- Valkey An open source (BSD) high-performance key/value datastore
- Solid Cache A database-backed ActiveSupport::Cache::Store
- Hazelcast A real-time data platform: a distributed in-memory data store with stream processing
- Amazon ElastiCache Fully managed, Valkey-, Memcached-, and Redis OSS-compatible caching service