Posted on

KoCache: A Coroutine-Native Loading Cache

https://codeberg.org/aasplund/KoCache

KoCache is a thread-safe, coroutine-based caching library for Kotlin. It provides a loading cache implementation designed for high-concurrency environments, featuring request coalescing (thundering herd protection), active TTL eviction, and LRU capacity enforcement.

The library utilizes Kotlin’s Deferred and Mutex primitives to synchronize access, ensuring that concurrent requests for the same missing key result in a single execution of the loader function.

https://twitter.com/marcinmoskala/status/2085713023025463330