Memcached
Memcached is a free, self-hosted in-memory key-value cache for reducing database load in dynamic web applications.
What Memcached is
Memcached is a free, self-hosted in-memory key-value cache for reducing database load in dynamic web applications. It holds small pieces of data such as strings, objects, and results from database calls, API calls, or page rendering. Clients use key-based hashing to choose a server; servers operate independently, without synchronization or replication. Cached items can expire after a specified time, and the default eviction policy removes least-recently-used items. Memcached is aimed at developers and is not code acceleration software or database middleware. Its API is available for most popular languages. The project provides source downloads and installation instructions, including package prerequisites for Debian/Ubuntu and Red Hat/CentOS. TLS authentication and encryption are supported from version 1.5.13 when built with TLS and used with a compatible client. Optional extstore moves values to flash while keeping keys and the hash table in memory, but requires version 1.6.0 or newer.
Good
- Free, self-hosted software.
- Caches database, API, and page-rendering results.
- Items can expire after a specified time.
- API available for most popular languages.
Watch out
- Servers do not synchronize or replicate.
- Extstore requires flash, not rotational media.
- A restart effectively empties extstore data.
- SASL does not encrypt communications.
Who it suits
Memcached suits developers who need a self-hosted cache for database, API, or page-rendering results. Teams should be comfortable deploying and operating cache servers themselves.
Verdict
Memcached offers a focused, free caching layer for dynamic applications. Its independent-server model and operational requirements are important considerations for teams planning a deployment.
Plans and prices
From Memcached's own pricing page, checked 30 Sep 2026.
| Plan | Price | What it gives you |
|---|---|---|
| Memcached | Free | Self-hosted software · no hosted plan or price listed · Free & open source |
The facts
Each one read from Memcached's own pages, with the date it was checked.
What it does
- Cached data
- It stores small chunks of arbitrary data, such as strings and objects, including results from database calls, API calls, or page rendering.checked 30 Sep 2026
- Cluster model
- Clients use a key-based hashing algorithm to select a server, while servers operate independently without synchronization or replication.checked 30 Sep 2026
- Developer audience
- The documentation describes Memcached as a developer tool and says it is not code acceleration software or database middleware.checked 30 Sep 2026
- Expiration and eviction
- Items can expire after a specified time, and the default eviction policy is least recently used (LRU).checked 30 Sep 2026
- Flash storage
- The optional extstore feature moves values to external storage while keeping keys and the hash table in memory, and requires Memcached 1.6.0 or newer.checked 30 Sep 2026
- Flash storage limit
- Extstore requires flash storage rather than rotational media, and a Memcached restart effectively empties its flash data.checked 30 Sep 2026
- Installation
- The downloads page provides a source tarball and installation instructions, including package prerequisites for Debian/Ubuntu and Red Hat/CentOS.checked 30 Sep 2026
- Item size limit
- The use cases documentation cites a 1 MB item-size limit.checked 30 Sep 2026
- Language support
- The maker says its API is available for most popular languages.checked 30 Sep 2026
- Origin
- Memcached was originally developed by Brad Fitzpatrick for LiveJournal in 2003.checked 30 Sep 2026
- Performance
- The documentation says queries on slow machines should run well under 1 ms and high-end servers can serve millions of keys per second.checked 30 Sep 2026
- Purpose
- Memcached is a distributed in-memory key-value cache intended to speed up dynamic web applications by reducing database load.checked 30 Sep 2026
- SASL security
- SASL can authenticate clients but does not encrypt communications, and the documentation says it is not suitable for use over the internet.checked 30 Sep 2026
- Support
- The project directs users to its Discord chat, documentation, and mailing list for questions, and points to Cache Forge for business support.checked 30 Sep 2026
- TLS security
- Memcached 1.5.13 and later supports authentication and encryption via TLS when built with TLS enabled and used with a TLS-capable client.checked 30 Sep 2026
The company
- Founded
- 2003checked 28 Sep 2026
The full review of Memcached
Memcached is a free, open-source cache for developers serving dynamic applications. It is best for teams willing to operate their own cache servers and whose workloads can tolerate refilling data after misses. The main decision is whether its very fast, deliberately independent cache model outweighs the absence of replication and its 1 MB item limit.
Overview
Memcached keeps small pieces of arbitrary data in memory so applications can reuse work instead of repeatedly querying a database, calling an API, or rendering a page. Strings and objects are suitable cache values, and an expiration time can remove entries when they are no longer useful. When memory fills, least recently used (LRU) eviction is the default, favoring recently accessed entries.
A client uses a key-based hashing algorithm to select a server. Each server then operates independently: there is no synchronization or replication between nodes. That reduces coordination overhead and suits applications that can regenerate missing values, but it does not preserve duplicate cache contents when a server is lost. Memcached began at LiveJournal in 2003 and remains a developer tool rather than code-acceleration software or database middleware.
Key features
Fast application caching
The documentation describes queries on slow machines completing well under 1 ms, while high-end servers can serve millions of keys per second. Those figures make repeated, compact lookups a strong use case, although actual results depend on the application and infrastructure. The 1 MB item-size limit excludes large individual objects and favors narrowly scoped results.
Protocols and language access
Memcached supports the Text protocol, Meta Text protocol, Binary protocol, and SASL authentication. Its maker says the API is available for most popular languages, so it can fit varied application stacks without replacing the systems that produce the cached data.
Optional external storage
The extstore feature, available in Memcached 1.6.0 and newer, moves values to flash while retaining keys and the hash table in memory. It requires flash rather than rotational media, and a restart effectively empties the flash data, so it extends capacity without turning the cache into durable storage.
Transport security
Versions 1.5.13 and later support client authentication and encrypted connections through TLS when built with TLS and paired with a TLS-capable client. SASL can authenticate clients but does not encrypt traffic and is not suitable for internet-facing use. Teams must therefore plan a TLS-capable build and client for protected deployments.
Pricing
Memcached — free, billed Free and open source. This is self-hosted software, not a hosted service, so the price covers the software rather than servers, storage, operations, or support. There is no free trial because the software itself is free; teams supply and maintain the deployment.
Platforms
Memcached supports API integrations, Linux, macOS, and self-hosted deployment. The downloads provide a source tarball and installation guidance, including package prerequisites for Debian/Ubuntu and Red Hat/CentOS. This is a practical fit for infrastructure teams comfortable compiling or packaging a service; it is not a turnkey hosted cache.
Who it's for
Choose Memcached for dynamic applications that repeatedly consume database results, API responses, or rendered-page output and can tolerate cache misses. It is particularly suitable for developers who want a language-accessible, low-latency cache and teams able to run independent cache nodes.
Look elsewhere when cache contents must be replicated, coordinated, or retained as durable data, or when individual values exceed 1 MB. Extstore can place values on flash, but a restart empties that data, so it does not solve persistence requirements.
Pros and cons
- Pros: Free, open-source software avoids licensing charges.
- Pros: Sub-millisecond-oriented design and high key throughput suit heavily repeated lookups.
- Pros: Expiration and LRU eviction provide straightforward control of short-lived data.
- Pros: TLS support enables authenticated, encrypted client connections in supported builds.
- Cons: Independent servers do not synchronize or replicate entries, so applications must tolerate misses and refill data.
- Cons: The 1 MB item limit rules out large cached objects.
- Cons: Self-hosting leaves infrastructure, updates, and day-to-day operations to the deploying team.
- Cons: SASL authentication alone leaves communications unencrypted and is unsuitable over the internet.
Alternatives
See Caching Software for the wider category.
- Amazon ElastiCache is the better direction for a managed cloud service, with paid usage and an AWS Free Tier option.
- Aiven for Valkey suits teams wanting hosted Valkey with a free tier, a trial, and paid managed plans.
- Garnet is an alternative for self-hosted Windows support or an Azure Cosmos DB deployment.
- Ristretto is an in-process Go cache rather than a separate cache server.
- Squid is a self-hosted proxy cache when proxy functionality is the priority.
- cache2k is an Apache-licensed Java library distributed through Maven Central.
- Apache Traffic Server is another free, self-hosted caching option.
- Accessibility Test Framework for Android is a free cross-platform developer tool, but it serves Android accessibility testing rather than application caching.
Verdict
Memcached is a strong choice for developers and operations teams needing a free, fast, self-hosted cache for compact, regenerable application results. Its independent-node design keeps deployment and lookup behavior direct. Choose another product when replication, durable cache contents, managed hosting, or values larger than 1 MB are central requirements.
Alternatives to Memcached
- 1

Amazon ElastiCache
Free planWebAPILinuxmacOS7.9From $0.09 a month - 2

Apache Traffic Server
Free planOpen sourceAPILinuxmacOSSelf-hosted7.2Free plan - 3
Ehcache
Free planOpen sourceAPISelf-hosted6.9Free plan - 4

Aiven for Valkey
Free planWebAPILinux6.8From $15 a month - 5
Google Cloud Memorystore
WebAPI6.4From $0.05 a month - 6
cache2k
Free planAndroidAPILinuxSelf-hosted6.2Free plan
