hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Moore (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HTTPCLIENT-975) add support to caching module for RFC 5861 (stale-on-error and stale-while-revalidate)
Date Sun, 19 Dec 2010 15:12:02 GMT

    [ https://issues.apache.org/jira/browse/HTTPCLIENT-975?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12973000#action_12973000
] 

Jon Moore commented on HTTPCLIENT-975:
--------------------------------------

I think I found a bug in the current implementation: I think stale-while-revalidate probably
needs to be subject to the same rules as those we apply when a revalidation fails due to an
IOException. Namely, stale-while-revalidate probably needs to yield to must-revalidate (it
is possible, although strange, for both directives to appear) and proxy-revalidate, and should
probably also not asynchronously validate if the request has an explicit freshness requirement
(max-stale for example).

Also, I am finding that the main execute() method in CachingHttpClient is in serious need
of refactoring -- it is really getting far too long, so I'm going to start by cleaning up
there.


> add support to caching module for RFC 5861 (stale-on-error and stale-while-revalidate)
> --------------------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-975
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-975
>             Project: HttpComponents HttpClient
>          Issue Type: New Feature
>          Components: Cache
>    Affects Versions: 4.1 Beta1
>            Reporter: Jonathan Moore
>            Assignee: Jon Moore
>             Fix For: 4.1.0
>
>         Attachments: stale-if-error.patch, stale-if-error.patch, stale-while-revalidate.patch,
stale-while-revalidate.updated.patch
>
>
> These are Cache-Control extensions that allow an origin server to specify some additional
behavior for stale cache entries. Stale-on-error configurations allow a cache to continue
serving stale content for a certain period of time if a revalidation fails, and stale-while-revalidate
similarly allows revalidation to occur asynchronously. Some reverse proxies such as Squid
can be configured to understand these headers, which means that some origin servers are probably
sending them, and that we can likewise take advantage of them.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


Mime
View raw message