hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clover <nomojom...@gmail.com>
Subject Re: Caching in http-core?
Date Wed, 19 Jun 2013 15:01:54 GMT
Is this in the context of caching for httpclient or the core code?   I'm new to the code base
and I'm trying to grok how to get what I need done. 


On Jun 19, 2013, at 4:43 AM, Sam Perman <sam@permans.com> wrote:

> Thanks for the response. And yes, I think that supports both the use cases
> I was thinking of.
> 
> thanks :)
> sam
> 
> 
> 
> On Wed, Jun 19, 2013 at 7:02 AM, Jon Moore <jonm@apache.org> wrote:
> 
>>> On Sat, 2013-06-15 at 07:18 -0700, Sam Perman wrote:
>>>> I think it would be interesting to open those Apis up so the
>> application
>>> could get cache entries for use in certain error cases.  (For example, my
>>> client app has detected the server is unavailable for some reason or I
>> have
>>> crossed some throttling limit for requests to the backend... I could
>> choose
>>> not to attempt a call to the backend and just return the cache entry
>>> instead.)
>> 
>> Hi Sam,
>> 
>> Many of the features you describe are already available from the
>> httpclient-based caching stack by modifying the requests that are sent. For
>> example, you can add 'Cache-Control: max-stale=31536000, only-if-cached' to
>> requests to prevent origin requests and get at any existing cache entries.
>> The caching stack also supports the stale-if-error (RFC5861) request
>> parameter, and will already return stale cache entries on networking errors
>> during revalidation.
>> 
>> Do those support your use cases?
>> 
>> The primary reason we've preferred to keep much of the caching APIs private
>> is to allow room for future refactorings without breaking API
>> compatibility.
>> 
>> Jon
>> 

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message