Class StandardCacheProvider

  • All Implemented Interfaces:

    public class StandardCacheProvider
    extends BaseProvider
    Default standard usual ordinary habitual ;) CacheProvider. Use this for example when writing an end2end component test and wanting to bind to "just some implementation, the usual one that will probably be available at runtime".

    In the future, this may be extended to allow dynamically switching out cache implementations at run-time. Therefore, all client code should refer to this instead of another specific implementation.

    • Constructor Detail

      • StandardCacheProvider

        public StandardCacheProvider​(CacheManagersRegistry cacheManagersRegistry)
    • Method Detail

      • newCache

        public <K,​V> Cache<K,​V> newCache​(CacheConfig<K,​V> cacheConfig,
                                                     CachePolicy initialPolicy)
        Description copied from interface: CacheProvider
        Creates a brand new Cache (API with unchecked exceptions), based on the passed configuration and policy. It is the caller's responsibility to AutoCloseable.close() a Cache obtained from this when they stop.