Hi all, so what are my options when it comes to disk-based LRU cache implementations? There is the o...
d
Hi all, so what are my options when it comes to disk-based LRU cache implementations? There is the old one (https://github.com/JakeWharton/DiskLruCache) from Jake (originally from Google apparently), written in Java, which is basically discontinued, then there is this one (https://github.com/solkin/disk-lru-cache) which looks promising at first, but has bad test coverage, and finally OkHttp comes with one (https://github.com/square/okhttp/blob/master/okhttp/src/jvmMain/kotlin/okhttp3/internal/cache/DiskLruCache.kt), clearly based on Jake’s / Google’s, but in Kotlin, with quite a few inner dependencies to things from OkHttp itself. Tried to extract the latter and ended up with 3000+ LOC including tests (without OkHttp’s
TaskRunner
setup, but
Coroutines
for cleanup handling), which made some tests fail and overall made me feel I was doing something wrong (don’t want to import so many LOC in my tree).
👀 1
m