Interface CacheStore


  • @ProviderType
    public interface CacheStore
    Creates, manages and deletes cache files.
    • Method Detail

      • create

        CacheFile create​(String key,
                         Headers headers)
                  throws IOException
        Create a new cache file.
        Parameters:
        key - cache key
        headers - response headers
        Returns:
        new cache file
        Throws:
        IOException - if an I/O error occurs
      • lookup

        CacheFile lookup​(String key)
        Lookup an existing cache file.
        Parameters:
        key - cache key
        Returns:
        existing cache file or null
      • evict

        boolean evict​(String key)
        Evict some cache file.
        Parameters:
        key - cache key
        Returns:
        true if some file was evicted; false otherwise
      • evictAll

        void evictAll​(String host,
                      String path)
        Evict all cache files starting with a given path.
        Parameters:
        host - hostname
        path - path prefix