sksamuel / aedile

Kotlin Wrapper for Caffeine
Apache License 2.0
164 stars 15 forks source link

Ideas for trivial convenience features that go beyond strict wrapping #4

Closed sschuberth closed 1 year ago

sschuberth commented 1 year ago

I'm wondering whether it would be in scope of this project to maybe do a little bit more than strict wrapping, and add some (opinionated) convenience functions here and there. Specifically, I'm thinking about persisting the cache between application runs, which Caffeine is prepared for, but does not implement directly because "Java serialization is pretty bad" and "The intent is to [...] not [to] dictate how it should be done".

With Kotlin and kotlinx.serialization, serialization is in good shape IMO, and using Protobuf could be a good candidate to save / restore the in-memory cache.

What do you think @sksamuel, would that be a reasonable functionality to add?

sksamuel commented 1 year ago

Hi @sschuberth In general, adding convenience functions == yes. But for persisting a cache, that seems very specific functionality to me ?

sschuberth commented 1 year ago

But for persisting a cache, that seems very specific functionality to me ?

Really? That's the first thing I was missing. But given that I'm not even using Caffeine / Aedile yet, I'm trusting on your guys here. Maybe I'm simply trying to use the wrong library for my purpose. So let me close this.