A high-performance, in-memory caching library for Go with adaptive eviction policies and low memory overhead.
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.
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.
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.
A high performance caching library for Go
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Implements W-TinyLFU for high hit rates across diverse workloads, as shown in linked benchmark results, ensuring efficient cache admission.
Minimizes lock contention with techniques like BP-Wrapper, delivering excellent throughput under high contention, per the throughput benchmarks.
Uses node code generation to keep memory consumption near-zero for unused features, making it efficient across cache capacities.
Self-tunes data structures based on contention and workload patterns, reducing manual optimization effort for developers.
Requires Go 1.24+ and only supports the two latest minor versions, which can block adoption in projects with fixed or older Go environments.
Persistence is limited to file-based save/load, lacking integration with databases or distributed storage, making it less suitable for enterprise-scale durability.
While automatic configuration helps, optimizing for edge-case workloads requires understanding advanced algorithms like adaptive W-TinyLFU, which may intimidate some developers.