Module methanol

Class CacheStrategy


  • public final class CacheStrategy
    extends java.lang.Object
    A strategy for determining whether a stored response is fresh enough for the cache to serve without contacting the origin, based on the caching rules imposed by the server and client.
    • Method Detail

      • isCacheResponseServable

        public boolean isCacheResponseServable()
      • isCacheResponseServableOnError

        public boolean isCacheResponseServableOnError()
      • requiresBackgroundRevalidation

        public boolean requiresBackgroundRevalidation()
      • addCacheHeaders

        public void addCacheHeaders​(ResponseBuilder<?> builder)
      • conditionalize

        public java.net.http.HttpRequest conditionalize​(java.net.http.HttpRequest request)