Join Slack
Hi all, so what are my options when it comes to disk-based LRU cache implementations? There is the o...
# android
d
dead.fish
03/25/2022, 8:10 AM
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
mirland
03/25/2022, 6:55 PM
Store uses guava
https://github.com/dropbox/Store/tree/main/cache
42
Views
Open in Slack
Previous
Next
kotlinlang
A modern programming language that makes developers happier.
Powered by