Class CaffeineCachingProvider

  • All Implemented Interfaces:
    Closeable, AutoCloseable, CachingProvider

    public final class CaffeineCachingProvider
    extends Object
    implements CachingProvider
    A provider that produces a JCache implementation backed by Caffeine. Typically, this provider is instantiated using Caching.getCachingProvider() which discovers this implementation through a ServiceLoader.

    This provider is expected to be used for application life cycle events, like initialization. It is not expected that all requests flow through the provider to obtain the cache manager and cache instances for request operations. Internally, this implementation is synchronized to avoid using excess memory due to its infrequent usage.