Interface HttpCacheStore


  • public interface HttpCacheStore
    Data store for persisting cache items. Data store implementation could be in-memory, disk or even JCR repository. Multiple implementation of this cache store can be present at any time and they can work in conjunction.
    • Method Detail

      • contains

        boolean contains​(CacheKey key)
        Check if there is an entry in cache for the given key.
        Parameters:
        key -
        Returns:
      • getIfPresent

        CacheContent getIfPresent​(CacheKey key)
        Get the Cache item given a key.
        Parameters:
        key - bject holding the key attributes.
        Returns:
        Object holding the content which needs to be cached. Null if key not present.
      • size

        long size()
        Get the number of entries in the cache.
        Returns:
      • invalidate

        void invalidate​(CacheKey key)
        Invalidate the given cache key.
        Parameters:
        key -
      • invalidate

        void invalidate​(HttpCacheConfig cacheConfig)
        Invalidate all the cached items applicable for the given cache config.
        Parameters:
        cacheConfig -
      • invalidateAll

        void invalidateAll()
        Invalidate all entries in the cache.
      • createTempSink

        TempSink createTempSink()
        Create a temp sink for stashing response stream.
        Returns:
      • getStoreType

        String getStoreType()
        Returns the store type of this store.
        Returns: