Software

Ristretto – concurrent in-memory cache library

Ristretto is an in-memory caching library designed for applications requiring high throughput and efficient memory utilisation under concurrent workloads. Originally developed for the Dgraph database, it provides a shared cache that can be accessed by numerous concurrent operations without relying on a single global lock for every request.

Ristretto uses admission and eviction policies to determine which objects deserve space in memory. Its TinyLFU admission mechanism estimates how frequently items are requested, while SampledLFU selects entries for eviction. Rather than simply counting the number of cached objects, developers can assign a cost to each entry, allowing memory budgets to reflect differences in object size or computational expense. Cache writes are buffered, so newly submitted entries may not become immediately available.

This is free and open source software.

Key Features

  • Concurrent cache access with minimal contention between operations.
  • TinyLFU admission policy for identifying frequently accessed entries.
  • SampledLFU eviction policy for selecting cache entries to remove.
  • Cost-based eviction using configurable values for individual entries.
  • Configurable maximum cache cost.
  • Frequency counters for estimating access patterns.
  • Buffered cache operations for reducing contention under heavy workloads.
  • Support for generic key and value types.
  • Simple API for inserting, retrieving and deleting entries.
  • Optional performance metrics for monitoring cache hit ratios and throughput.
  • Explicit cache shutdown and resource cleanup.
  • Configurable buffering and frequency tracking parameters.

Website: github.com/dgraph-io/ristretto
Support:
Developer: Dgraph Labs and contributors
License: Apache License 2.0

Ristretto is written in Go. Learn Go with our recommended free books and free tutorials.


Related Software

Caching Systems
MemcachedHigh-performance distributed memory object caching system
RedisPersistent key-value database with network interface
HazelcastDistributed in-memory data store and computation platform
Apache IgniteDistributed database, caching and processing platform
EhcacheStandards based pure Java in-process cache
Java Caching SystemDistributed caching system written in Java
CouchbaseDistributed key-value database management system
Apache GeodeDistributed, in-memory data management platform
yrmcdsLRU cache library and key-value server
CachelotMemory object caching system with master/slave replication
InfinispanDistributed, in-memory database and data grid

Read our verdict in the software roundup.


Best Free and Open Source Software LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.

We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more.

Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion.

Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted