Module methanol

Interface CacheAwareResponse<T>

All Superinterfaces:
HttpResponse<T>, TrackedResponse<T>

public interface CacheAwareResponse<T> extends TrackedResponse<T>
A TrackedResponse that knows it may have been generated from an HTTP cache.
  • Method Details

    • networkResponse

      Optional<TrackedResponse<?>> networkResponse()
      Returns an Optional for the response received as a result of using the network. An empty optional is returned in case the response was entirely constructed from cache.
    • cacheResponse

      Optional<TrackedResponse<?>> cacheResponse()
      Returns an Optional for the response constructed from cache. An empty optional is returned in case no response matching the initiating request was found in the cache.
    • cacheStatus

      Returns this response's CacheAwareResponse.CacheStatus.