https://kotlinlang.org logo
Title
t

Tiago Brito

06/21/2020, 3:35 PM
Hello! I am looking for some cache library developed in Kotlin Any suggestions?
e

edrd

06/21/2020, 3:37 PM
It needs to be developed in Kotlin or you mean a library that can be used in Kotlin?
t

Tiago Brito

06/21/2020, 3:39 PM
Needs to be developed in Kotlin
d

deactivateduser

06/21/2020, 3:39 PM
https://github.com/dropbox/Store You can try this and see if it fits your requirements
👍🏾 2
n

no

06/22/2020, 4:38 PM
Can I ask why it needs to be developed in kotlin? Out of curiousity?
👀 1
t

Tiago Brito

06/23/2020, 2:42 PM
Yes, just out of curiosity. For JVM I know cache2k, caffeine, guava
m

Matteo Mirk

06/23/2020, 3:26 PM
@deactivateduser Dropbox Store looks way more than a cache… seems a kind of Repository Pattern implementation that manages data fetching over the network and caches it. Anyway, seems to be a nice lib.
@Tiago Brito here’s a cache lib written in Kotlin https://github.com/appmattus/layercache
w

Wilfred

06/23/2020, 8:50 PM
looks android specific 🤔
☝️🏾 2
m

Matteo Mirk

06/24/2020, 7:58 AM
No it’s not Android specific, read carefully: there’s a base module and an optional
layercache-android
module that you can add to dependencies. Anyway @Tiago Brito, apart from your curiosity, I would advise to use Caffeine or similar, as they are state of the art in caching implementation on the JVM and no 100% Kotlin lib is on feature par with that yet. If you need something more manageable, you could use tekniq-cache , which is a Kotlin wrapper around Caffeine.
👍 2
f

Fabio

07/06/2020, 3:38 AM
I believe okhttp v3 has been entirely ported to kotlin. It's from square which means pretty much revered and used by virtually any android dev. https://square.github.io/okhttp/
m

Matteo Mirk

07/06/2020, 8:24 AM
OkHttp is an HTTP client, we were discussing about caches here… 🙂