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 ofTimeValue.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 Modifier Constructor Description private
NoAgeCacheValidityPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.hc.core5.util.TimeValue
getCurrentAge(HttpCacheEntry entry, java.time.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
-
-
-
-
Method Detail
-
getCurrentAge
public org.apache.hc.core5.util.TimeValue getCurrentAge(HttpCacheEntry entry, java.time.Instant now)
- Overrides:
getCurrentAge
in classCacheValidityPolicy
-
-