Interface LocalCacheProvider

All Superinterfaces:
org.keycloak.provider.Provider

public interface LocalCacheProvider extends org.keycloak.provider.Provider
A Provider to abstract the creation of local, non-clustered, in-memory caches from the underlying cache implementation.
  • Method Summary

    Modifier and Type
    Method
    Description
    <K, V> LocalCache<K,V>
    create(LocalCacheConfiguration<K,V> configuration)
    Creates a new LocalCache instance for local caching.

    Methods inherited from interface org.keycloak.provider.Provider

    close
  • Method Details

    • create

      <K, V> LocalCache<K,V> create(LocalCacheConfiguration<K,V> configuration)
      Creates a new LocalCache instance for local caching. LocalCacheProvider implementations are not responsible for managing the lifecycle of created LocalCache instances. It is the responsibility of LocalCache consumers to ensure that LocalCache.close() is called when the cache is no longer required.
      Type Parameters:
      K - the type of the cache Keys used for lookup
      V - the type of the cache Values to be stored
      Parameters:
      configuration - the desired cache configuration
      Returns:
      LocalCache a newly created cache