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.
  • Field Details

  • Method Details

    • put

      void put(CacheKey key, CacheContent content) throws HttpCacheDataStreamException
      Put an item into the cache.
      Parameters:
      key - Object holding the key attributes.
      content - Object holding the content which needs to be cached.
      Throws:
      HttpCacheDataStreamException - Failure when reading the input stream.
    • 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: