Interface CacheFile


  • @ProviderType
    public interface CacheFile
    A cache file contains the response headers and body that can be delivered on subsequent requests for the same resource. TODO: currently there are methods that only makes sense while either using an existing cache file or creating a new one: it might be more appropriate to create separate interfaces for that.
    • Method Detail

      • getKey

        String getKey()
        Return the cache key.
        Returns:
        cache key
      • getHeaders

        Headers getHeaders()
        Return the HTTP response headers stored with this entry.
        Returns:
        response headers
      • save

        boolean save()
        Keep this cache file.
        Returns:
        true if the save was successful; false otherwise
      • discard

        void discard()
        Discard this cache file.