akka-http
akka-http copied to clipboard
Allow a custom caffeine cache loader
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
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]?