Class AbstractCache

java.lang.Object
io.quarkus.cache.runtime.AbstractCache
All Implemented Interfaces:
Cache
Direct Known Subclasses:
CaffeineCacheImpl, NoOpCache

public abstract class AbstractCache extends Object implements Cache
  • Field Details

  • Constructor Details

    • AbstractCache

      public AbstractCache()
  • Method Details

    • getDefaultKey

      public Object getDefaultKey()
      Description copied from interface: Cache
      Returns the unique and immutable default key for the current cache. This key is used by the annotations caching API when a no-args method annotated with @io.quarkus.cache.CacheResult or @io.quarkus.cache.CacheInvalidate is invoked. It can also be used with the programmatic caching API.
      Specified by:
      getDefaultKey in interface Cache
      Returns:
      default cache key
    • as

      public <T extends Cache> T as(Class<T> type)
      Description copied from interface: Cache
      Returns this cache as an instance of the provided type if possible.
      Specified by:
      as in interface Cache
      Returns:
      cache instance of the provided type