Interface CacheStore


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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      CacheFile create​(java.lang.String key, Headers headers)
      Create a new cache file.
      boolean evict​(java.lang.String key)
      Evict some cache file.
      void evictAll​(java.lang.String host, java.lang.String path)
      Evict all cache files starting with a given path.
      CacheFile lookup​(java.lang.String key)
      Lookup an existing cache file.
    • Method Detail

      • create

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

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

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

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