Module methanol

Class CacheStrategy

java.lang.Object
com.github.mizosoft.methanol.internal.cache.CacheStrategy

public final class CacheStrategy extends 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 Details

    • isCacheResponseServable

      public boolean isCacheResponseServable()
    • isCacheResponseServableOnError

      public boolean isCacheResponseServableOnError()
    • requiresBackgroundRevalidation

      public boolean requiresBackgroundRevalidation()
    • addCacheHeaders

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

      public HttpRequest conditionalize(HttpRequest request)