arturobernalg opened a new pull request, #422: URL: https://github.com/apache/httpcomponents-client/pull/422
This Pull request implements the stale-if-error request cache directive from RFC 5861 in the BasicHttpCache class. The stale-if-error directive allows clients to receive a stale cache entry when a request results in an error, rather than an error response. To implement this, we added the cacheConfig and cacheValidityPolicy fields to the BasicHttpCache class and modified the getCacheEntry method to check if the staleIfError directive is enabled and return the stale cache entry if it is. Additionally, we updated the CacheConfig class to add a staleIfErrorEnabled boolean field to control this behavior. Here's a summary of the changes: Added cacheConfig and cacheValidityPolicy fields to BasicHttpCache Modified getCacheEntry to check for the staleIfError directive and return the stale cache entry if enabled Added staleIfErrorEnabled boolean field to CacheConfig Please let me know if there are any further changes or modifications required. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org