Interface CacheProvider


  • public interface CacheProvider
    A provider for cache instances.
    • Method Detail

      • getCache

        <K,​V> ExpiringValueCache<K,​V> getCache​(String cacheName)
        Gets a new instance of a cache by name.

        It is up to the provider how the cache instance is created, or it creates a new or returns an existing one.

        Type Parameters:
        K - The type of keys that the cache supports.
        V - The type of values that the cache supports.
        Parameters:
        cacheName - the name of the cache to get. Must not be null.
        Returns:
        The new cache instance, may be null if no cache with that name can be provided.
        Throws:
        NullPointerException - if the cache name is null.