Class HttpByteArrayCacheEntrySerializer.NoAgeCacheValidityPolicy
java.lang.Object
org.apache.hc.client5.http.impl.cache.CacheValidityPolicy
org.apache.hc.client5.http.impl.cache.HttpByteArrayCacheEntrySerializer.NoAgeCacheValidityPolicy
- Enclosing class:
HttpByteArrayCacheEntrySerializer
private static class HttpByteArrayCacheEntrySerializer.NoAgeCacheValidityPolicy
extends CacheValidityPolicy
Cache validity policy that always returns an age of
TimeValue.ZERO_MILLISECONDS
.
This prevents the Age header from being written to the cache (it does not make sense to cache it),
and is the only thing the policy is used for in this case.-
Field Summary
Fields inherited from class org.apache.hc.client5.http.impl.cache.CacheValidityPolicy
MAX_AGE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hc.core5.util.TimeValue
getCurrentAge
(HttpCacheEntry entry, Instant now) Methods inherited from class org.apache.hc.client5.http.impl.cache.CacheValidityPolicy
contentLengthHeaderMatchesActualLength, getAgeValue, getApparentAge, getCorrectedInitialAge, getCorrectedReceivedAge, getFreshnessLifetime, getHeuristicFreshnessLifetime, getMaxAge, getResidentTime, getResponseDelay, getStaleness, hasCacheControlDirective, isResponseFresh, isResponseHeuristicallyFresh, isRevalidatable, mayReturnStaleIfError, mayReturnStaleWhileRevalidating, mustRevalidate, proxyRevalidate
-
Constructor Details
-
NoAgeCacheValidityPolicy
private NoAgeCacheValidityPolicy()
-
-
Method Details
-
getCurrentAge
- Overrides:
getCurrentAge
in classCacheValidityPolicy
-