Open
Description
It would be totally bad-ass if AHC would support response cache, meaning that AHC would not fire up actual HTTP request if valid response would be already in the cache.
I think that it would be great to add such infrastructure to AHC code:
- AHC
Cache
interface with only no-op implementation - Interface and default implementation that would evaluate whether response is cacheable
- Interface and default implementation that would map
Request
to cache key
Later we could add extra
modules that would implement Cache
interface using guava
/caffeine
/mapdb
cache implementations.
I'm willing to contribute :-)
References: