Interface CacheStrategy


@ConsumerType public interface CacheStrategy
A cache-strategy implements the core decisions about storage time and lifetime of responses that are temporarily or permanently cached by inserting cache points into a JsonPipeline (via JsonPipeline.addCachePoint(CacheStrategy)). The decisions can vary depending on the REST requests that were executed to obtain the JSON data to be cached.
  • Method Details

    • getCachePersistencyOptions

      CachePersistencyOptions getCachePersistencyOptions(Collection<io.wcm.caravan.io.http.request.CaravanHttpRequest> requests)
      Parameters:
      requests - the REST requests that were used to obtain the data to be stored in the cache
      Returns:
      cache persistency options for persistent cache strategies