Class PassThroughCache

java.lang.Object
com.atlassian.plugin.cache.filecache.impl.PassThroughCache
All Implemented Interfaces:
Cache

public class PassThroughCache extends Object implements Cache
Always streams each resource from the given input
Since:
v2.13
  • Constructor Details

    • PassThroughCache

      public PassThroughCache()
  • Method Details

    • cache

      public boolean cache(String bucket, String key, OutputStream out, Cache.StreamProvider provider)
      Description copied from interface: Cache
      Stream the contents identified by the key to the destination stream. Should the contents not exist in the cache a new entry should be created if the implementation is a caching implementation.
      Specified by:
      cache in interface Cache
      Parameters:
      bucket - bucket to group keys
      key - can not be null
      out - where to write the cached item to
      provider - provides the underlying item on a cache-miss
      Returns:
      if it was a cache-hit
    • cacheTwo

      public boolean cacheTwo(String bucket, String key, OutputStream out1, OutputStream out2, Cache.TwoStreamProvider provider)
      Description copied from interface: Cache
      Stream two contents identified by the key to the destination stream. Should the contents not exist in the cache a new entry should be created if the implementation is a caching implementation.
      Specified by:
      cacheTwo in interface Cache
      Parameters:
      bucket - bucket to group keys
      key - can not be null
      out1 - where to write the first cached item to
      out2 - where to write the second cached item to
      provider - provides the underlying item on a cache-miss
      Returns:
      if it was a cache-hit
    • clear

      public void clear()
      Description copied from interface: Cache
      Remove all entries in the cache.
      Specified by:
      clear in interface Cache