Open
Description
The CachingHttpClient
internally uses HttpCache
. That class, however, has been designed as a public
(shared; surrogate) cache.
In this "downstream" caching use case, however, it would be valuable if we
- could make the cache store
private
responses, possibly even by default, - enforce a "greedy" caching strategy, i. e. a minimum TTL to apply regardless of what the upstream server sent
- support
stale-while-revalidate
behavior 🆒
Client-side caching in the HttpClient
is useful in µService architectures where you possibly hit a lot of backend APIs; stale-while-revalidate
and stale-if-error
may further improve performance or even save the day when a backend service goes down.