Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. otter

otter

Apache-2.0Gov2.3.0

A high-performance, in-memory caching library for Go with adaptive eviction policies and low memory overhead.

Visit WebsiteGitHubGitHub
2.6k stars64 forks0 contributors

What is otter?

Otter is a high-performance, in-memory caching library for Go that provides adaptive eviction policies, low memory overhead, and excellent throughput under contention. It solves the problem of efficient data caching in Go applications by implementing advanced algorithms like W-TinyLFU and automatic configuration based on workload patterns.

Target Audience

Go developers building applications that require efficient in-memory caching, such as web servers, APIs, real-time systems, or data-intensive services where performance and low latency are critical.

Value Proposition

Developers choose Otter for its combination of high hit rates, excellent throughput, and minimal memory overhead, along with a flexible and configurable API that supports features like automatic loading, asynchronous refresh, and persistence without sacrificing performance.

Overview

A high performance caching library for Go

Use Cases

Best For

  • Improving application performance with efficient in-memory caching
  • Reducing database load by caching frequently accessed data
  • Building high-throughput Go services that require low-latency data access
  • Implementing adaptive cache eviction policies for varying workloads
  • Minimizing memory overhead in caching layers
  • Protecting against cache stampede with deduplicated loader calls

Not Ideal For

  • Distributed systems requiring multi-node cache synchronization — Otter is in-memory and single-instance, lacking built-in clustering or distributed coordination.
  • Projects stuck on older Go versions (below 1.24) — Otter only supports the two most recent minor Go releases, making it incompatible with legacy or version-locked codebases.
  • Ultra-simple caching where a basic sync.Map suffices — Otter's feature set and automatic configuration add complexity unjustified for trivial, low-throughput caching tasks.
  • High-availability scenarios needing robust, transactional persistence — Otter's file-based save/load is basic and may not handle failures, large datasets, or real-time replication well.

Pros & Cons

Pros

Adaptive Eviction Policy

Implements W-TinyLFU for high hit rates across diverse workloads, as shown in linked benchmark results, ensuring efficient cache admission.

High Concurrency Performance

Minimizes lock contention with techniques like BP-Wrapper, delivering excellent throughput under high contention, per the throughput benchmarks.

Low Memory Overhead

Uses node code generation to keep memory consumption near-zero for unused features, making it efficient across cache capacities.

Automatic Configuration

Self-tunes data structures based on contention and workload patterns, reducing manual optimization effort for developers.

Cons

Go Version Constraints

Requires Go 1.24+ and only supports the two latest minor versions, which can block adoption in projects with fixed or older Go environments.

Basic Persistence Limitations

Persistence is limited to file-based save/load, lacking integration with databases or distributed storage, making it less suitable for enterprise-scale durability.

Learning Curve for Tuning

While automatic configuration helps, optimizing for edge-case workloads requires understanding advanced algorithms like adaptive W-TinyLFU, which may intimidate some developers.

Frequently Asked Questions

Quick Stats

Stars2,649
Forks64
Contributors0
Open Issues5
Last commit1 month ago
CreatedSince 2023

Tags

#in-memory-cache#high-performance#caching#cache#go#concurrent-cache#cache-library#memory-optimization#performance

Built With

G
Go

Links & Resources

Website

Included in

Go169.1k
Auto-fetched 18 hours ago

Related Projects

groupcachegroupcache

groupcache is a caching and cache-filling library, intended as a replacement for memcached in many cases.

Stars13,340
Forks1,392
Last commit1 year ago
BigCacheBigCache

Efficient cache for gigabytes of data written in Go.

Stars8,149
Forks611
Last commit4 days ago
ristrettoristretto

A high performance memory-bound Go cache

Stars6,969
Forks444
Last commit9 days ago
gocachegocache

☔️ A complete Go cache library that brings you multiple ways of managing your caches

Stars2,877
Forks223
Last commit21 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub