Get the latest tech news

The Evolution of Caching Libraries in Go


¶ For the last few years, I've been developing caching library, and today I'd like to talk about the evolution of caches in Go and where we stand today. Especially since Go 1.24 was officially supposed to focus on caching improvements, but I haven't heard much news about them - time to fix that .

Lossy read buffers aren't ideal: they consume noticeable memory for small caches, and more critically, can significantly reduce hit rates under high contention. I started developing Otter v1 in mid 2023 when we discovered a severe hit rate degradation after attempting to update dependencies in a legacy service that used one of Ristretto's earliest versions. As mentioned in the Theine discussion, lossy read buffers aren’t ideal: They consume noticeable memory for small caches and, more critically, can significantly reduce hit rate under high contention.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Evolution

Evolution

Photo of libraries

libraries

Related news:

News photo

California man steals $10k of Nintendo Switch games from libraries, now faces more than a large late fee

News photo

Libraries are under-used. LLMs make this problem worse

News photo

Your Smartphone Is a Parasite, According to Evolution | The greatest parasite of the modern age is no blood-sucking invertebrate. It is sleek, glass-fronted and addictive by design. Its host? Every human on Earth with a wifi signal.