akka-http icon indicating copy to clipboard operation
akka-http copied to clipboard

Allow a custom caffeine cache loader

Open Marcus-Rosti opened this issue 3 years ago • 1 comments

I'd love to be able to plugin a specific caffeine implementation rather than just the default. For instance with an oauth token that requires being "refreshed" via an http request. I'd love to be able to use https://github.com/ben-manes/caffeine/wiki/Refresh to do it

Marcus-Rosti avatar May 09 '22 17:05 Marcus-Rosti

I think that would be useful. Could it be as simple as a function which creates an akka-http Cache[T] from an arbitrary caffeine AsyncCache[T]?

jrudolph avatar May 10 '22 15:05 jrudolph