{"repo":"dgraph-io/ristretto","free":true,"listed":false,"github":"https://github.com/dgraph-io/ristretto","clone":"git clone https://github.com/dgraph-io/ristretto.git","description":"A high performance memory-bound Go cache","language":"Go","stars":6975,"topics":["cache","performance","golang","go","library"],"license":"Apache-2.0","category":"databases-storage","readme_excerpt":"Ristretto Ristretto is a fast, concurrent cache library built with a focus on performance and correctness. The motivation to build Ristretto comes from the need for a contention-free cache in [Dgraph][]. [Dgraph]: https://github.com/dgraph-io/dgraph Features - High Hit Ratios - with our unique admission/eviction policy pairing, Ristretto's performance is best in class. - Eviction: SampledLFU - on par with exact LRU and better performance on Search and Database traces. - Admission: TinyLFU - extra performance with little memory overhead (12 bits per counter). - Fast Throughput - we use a variety of techniques for managing contention and the result is excellent throughput. - Cost-Based Eviction - any large new item deemed valuable can evict multiple smaller items (cost could be anything). - Fully Concurrent - you can use as many goroutines as you want with little throughput degradation. - Metrics - optional performance metrics for throughput, hit ratios, and other stats. - Simple API - just figure out your ideal Config values and you're off and running. Status Ristretto is production-ready. See Projects using Ristretto. Getting Started Installing To start using Ristretto, install Go 1.21 or above. Ristretto needs go modules. From your project, run the following command This will retrieve the library. Choosing a version Following these rules: - v1.x.x is the first version used in most programs with Ristretto dependencies. - v2.x.x is the new version with support for generics, fo","default_branch":null,"files":null,"tree":[],"storefront":"/r/dgraph-io","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/dgraph-io/ristretto/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}