[
https://issues.apache.org/jira/browse/HTTPCLIENT-994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12908446#action_12908446
]
Jonathan Moore commented on HTTPCLIENT-994:
-------------------------------------------
Hi Oleg,
Good question. Currently the CachedResponseSuitabilityChecker is where we
decide whether a specific cache entry can be used to satisfy a given request.
This is the class that could be replaced or extended to provide alternative
(but allowed) caching policies, like heuristic caching, for example.
Please take a look, but I am pretty certain that all the methods on
HttpCacheEntry now are either calculations whose definitions are given in the
RFC (apparent age, freshness lifetime, whether it can be revalidated, etc.) or
related to MUST-level requirements (treating malformed Expires headers as
'already stale').
Also, CacheValidityPolicy, where all these methods used to live, had almost no
interesting state, and all it's methods took an HttpCacheEntry as an argument;
it seemed pretty clear these two classes "wanted" to be merged. :)
Jon
> cache does not allow client to override origin-specified freshness using
> max-stale
> ----------------------------------------------------------------------------------
>
> Key: HTTPCLIENT-994
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-994
> Project: HttpComponents HttpClient
> Issue Type: Improvement
> Components: Cache
> Affects Versions: 4.1 Alpha2
> Reporter: Jonathan Moore
> Attachments: max-stale.patch
>
>
> According to the RFC, the default freshness lifetime is supposed to be the
> LEAST restrictive of that specified by the origin, the client, and the cache.
> Right now, a client can't use 'max-stale' to relax the freshness constraints
> to get a cache hit without validation occuring first.
--
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: [email protected]
For additional commands, e-mail: [email protected]