awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
dgraph-io avatar

dgraph-io/ristretto

0
View on GitHub↗
6,932 stars·438 forks·Go·Apache-2.0·34 viewshypermode.com/blog/introducing-ristretto-high-perf-go-cache↗

Ristretto

Ristretto is a high-performance in-memory cache and concurrent key-value store for Go applications. It provides a thread-safe memory store that manages strict memory bounds and employs probabilistic set filters to reduce lookup overhead.

The system is distinguished by an admission-policy cache that utilizes frequency sketches and cost-based eviction to maximize hit ratios. It minimizes contention and improves throughput through the use of striped ring buffers and concurrent map sharding.

The project covers a broad range of data management capabilities, including time-based expiration, item frequency estimation, and batch cache updates. It also includes operational telemetry for tracking cache performance metrics and hit ratios, along with the ability to serialize filter states.

Features

  • Concurrent Caches - Implements a thread-safe data structure designed for high-concurrency environments to manage object lifecycles.
  • Go In-Memory Caches - Provides a high-performance in-memory key-value store specifically optimized for Go applications.
  • Cache Eviction Policies - Implements cache eviction policies based on cost and frequency to maximize hit ratios within memory limits.
  • Data Caching - Provides a high-performance system for storing temporary data and session state to improve application performance.
  • Application State Caching - Provides high-speed in-memory caching for application state and session data to reduce database load.
  • Memory-Bounded Caching - Manages strict memory bounds by automatically evicting low-value data to prevent out-of-memory errors.
  • In-Memory Caches - Implements a high-performance in-memory cache system for accelerating data access in Go.
  • Key-Value Stores - Provides a high-throughput, thread-safe in-memory key-value store.
  • Probabilistic Membership Filters - Employs memory-efficient structures like bloom filters to check if an item exists in a set without storing full keys.
  • Trending Item Tracking - Uses memory-efficient probabilistic structures to identify and track the most frequent items within the cache.
  • Cache Cost Eviction - Removes items based on a weighted combination of access frequency and memory cost to maximize hit ratios.
  • Concurrent Data Structures - Implements thread-safe concurrent data structures to handle simultaneous read and write operations in Go.
  • Frequency-Based Admission - Implements frequency-based admission logic to determine which items should enter the cache to maximize hit ratios.
  • Concurrent Ring Buffering - Buffers incoming data in a ring structure to handle bursts and coordinate the transfer of items to a consumer.
  • Lock-Striped Sharding - Utilizes lock-striped sharding to split data across segments, minimizing global lock contention and improving throughput.
  • Striped - Buffers updates into multiple independent rings to reduce lock contention and improve write throughput.
  • Concurrent - Buffers data updates into striped rings and drains them in batches to reduce contention.
  • Expiration Policies - Automatically excludes items from retrieval if their predefined time-to-live expiration has passed.
  • Value Update Policies - Modifies existing entries in the cache using a custom function to determine if a value should be replaced.
  • In-Memory Cache Invalidations - Provides the ability to remove specific entries from the memory store to free space or invalidate stale data.
  • Thread-Safe Collection Operations - Supports adding and checking for elements across multiple concurrent threads using synchronized methods to prevent data races.
  • Cache Performance Metrics - Records internal performance data and admission statistics to evaluate cache efficiency.
  • Time-To-Live Expirations - Automatically removes stale data based on predefined time-to-live durations to maintain cache freshness.
  • Caching Libraries - High-performance cache library.

Star history

Star history chart for dgraph-io/ristrettoStar history chart for dgraph-io/ristretto

How this analysis was created: This summary and feature list are AI-generated from collected project material and can contain mistakes. Stars, license and language are imported from GitHub. Inclusion does not mean that we have tested or audited this project. Check the source documentation for any feature you depend on. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Projects sharing features with Ristretto

These projects share indexed features with Ristretto. Shared tags can include platform or build tooling; verify the primary use case before treating a result as a replacement.
  • patrickmn/go-cachepatrickmn avatar

    patrickmn/go-cache

    8,828View on GitHub↗

    go-cache is a thread-safe, in-memory cache library for Go that stores arbitrary objects with per-item expiration timestamps. It provides a concurrent key-value store where multiple goroutines can safely read and write shared cached data without external synchronization, using a mutex-guarded map for access control. The library distinguishes itself through its expiration management and optional disk persistence. Each cached item carries its own time-to-live, and a background goroutine periodically purges expired entries. The cache can serialize its entire contents to disk using Go's gob encodi

    Gocachegolibrary
    View on GitHub↗8,828
  • coocood/freecachecoocood avatar

    coocood/freecache

    5,399View on GitHub↗

    freecache is a high-performance, concurrent in-memory key-value store library for Go applications. It functions as a fixed-size cache that manages large volumes of data while eliminating garbage collection overhead through the use of preallocated memory and off-heap storage. The system maintains a predictable memory footprint by utilizing fixed memory allocation and circular buffer management, where new entries automatically overwrite the oldest data upon reaching capacity. It further reduces contention between simultaneous readers and writers through lock-striped concurrent access. The libr

    Go
    View on GitHub↗5,399
  • tporadowski/redistporadowski avatar

    tporadowski/redis

    9,987View on GitHub↗

    Redis is a high-performance in-memory key-value store that functions as a distributed cache, message broker, and NoSQL database. It provides sub-millisecond read and write access to data stored in RAM and can operate as a vector database for indexing high-dimensional embeddings. The system supports a wide range of data storage and synchronization primitives, including the management of strings, hashes, lists, sets, and JSON documents. It enables real-time data operations through atomic transactions, hybrid persistence using snapshots and append-only logs, and high-availability configurations

    Credisredis-for-windowsredis-msi-installer
    View on GitHub↗9,987
  • hashicorp/golang-lruhashicorp avatar

    hashicorp/golang-lru

    5,091View on GitHub↗

    This is a thread-safe in-memory cache library for Go that automatically evicts the least recently used items when capacity is reached. It provides a fixed-size memory cache designed to maintain a constant memory footprint by removing the oldest entries as new data arrives. The system includes an eviction manager that executes custom callbacks when entries are purged to facilitate resource cleanup. It also supports time-based expiration, allowing for the automatic removal of items after a specified time-to-live duration. The library covers general caching capabilities including cache inspecti

    Go
    View on GitHub↗5,091
Compare all 30 related projects→

Frequently asked questions

What does dgraph-io/ristretto do?

Ristretto is a high-performance in-memory cache and concurrent key-value store for Go applications. It provides a thread-safe memory store that manages strict memory bounds and employs probabilistic set filters to reduce lookup overhead.

What are the main features of dgraph-io/ristretto?

The main features of dgraph-io/ristretto are: Concurrent Caches, Go In-Memory Caches, Cache Eviction Policies, Data Caching, Application State Caching, Memory-Bounded Caching, In-Memory Caches, Key-Value Stores.

Which projects share features with dgraph-io/ristretto?

Projects with overlapping indexed features include: patrickmn/go-cache — go-cache is a thread-safe, in-memory cache library for Go that stores arbitrary objects with per-item expiration… coocood/freecache — freecache is a high-performance, concurrent in-memory key-value store library for Go applications. It functions as a… tporadowski/redis — Redis is a high-performance in-memory key-value store that functions as a distributed cache, message broker, and NoSQL… hashicorp/golang-lru — This is a thread-safe in-memory cache library for Go that automatically evicts the least recently used items when… memcached/memcached — Memcached is a high-performance, distributed, in-memory key-value storage and request routing engine. It functions as… facebook/rocksdb — RocksDB is a high-performance, embeddable persistent key-value library and storage engine based on Log-Structured…