Skip to content
SPECIFICTION
Get listed

Memcached vs Ristretto

Memcached

memcached.org

Ristretto

github.com

Side by side

FigureMemcachedRistretto
Price fromFreeFree
Free planYesYes
Free trial——
Open source——
Windows—Yes
macOSYesYes
LinuxYesYes
APIYes—
Self-hostedYesYes
Plans published11
Spec score · Caching Software7.9 (#10)7.5 (#13)
PurposeMemcached is a distributed in-memory key-value cache intended to speed up dynamic web applications by reducing database load.Ristretto is a fast, concurrent, memory-bound Go cache library focused on performance and correctness.

Plans

Memcached

  • MemcachedFree

Memcached pricing →

Ristretto

  • RistrettoFree

Ristretto pricing →

In their own words

Memcached

Memcached is a free, self-hosted in-memory key-value cache for reducing database load in dynamic web applications. It keeps small chunks of arbitrary data, such as strings, objects, and results from database calls, API calls, or page rendering. Clients use key-based hashing to choose a server, while servers operate independently without synchronization or replication. Items can expire after a specified time, and the default eviction policy is least recently used (LRU). The project describes Memcached as a developer tool, not code acceleration software or database middleware. Its API is available for most popular languages, and downloads include a source tarball and installation instructions with package prerequisites for Debian/Ubuntu and Red Hat/CentOS. TLS authentication and encryption are supported in version 1.5.13 and later when built with TLS and used with a TLS-capable client. Optional extstore moves values to external storage while keeping keys and the hash table in memory; it needs version 1.6.0 or newer. The project began in 2003. It is free and self-hosted, with no hosted plan or price listed.

Visit memcached.org

Ristretto

Ristretto is a free, open-source Go library for an in-process cache of key-value data, designed for concurrent use, performance and correctness. It keeps data in memory in a single process rather than operating as a distributed cache. TinyLFU admission and SampledLFU eviction are paired to target high hit ratios; applications define item cost, allowing a valuable large item to displace several smaller ones. The project attributes throughput to contention management, batching and eventual consistency. Goroutines can use the cache concurrently with little throughput degradation, according to the project, and optional metrics cover throughput, hit ratios and other statistics. A Set for a new item may be dropped in the Set buffer or admission policy, while updates are guaranteed. Ristretto requires Go 1.21 or later and Go modules. Version 2 supports generics, which the project recommends for new programs. The repository is licensed under Apache License, Version 2.0, and describes the library as production-ready. Its README names Badger and Dgraph as projects using it.

Visit github.com