Package ninja.cache

Class CacheProvider

  • All Implemented Interfaces:
    com.google.inject.Provider<Cache>, jakarta.inject.Provider<Cache>, javax.inject.Provider<Cache>

    public class CacheProvider
    extends Object
    implements com.google.inject.Provider<Cache>
    A provider that determines which implementation to load as a Cache based on the value of a configuration key in NinjaProperties (aka application.conf). The configured implementation is only resolved when its actually used vs. at application startup. If this variable is set the instance for that class is instantiated and used as cache implementation. If the variable is not set CacheEhCacheImpl is used by default.
    • Constructor Detail

      • CacheProvider

        @Inject
        public CacheProvider​(com.google.inject.Injector injector,
                             NinjaProperties ninjaProperties)
    • Method Detail

      • get

        public Cache get()
        Specified by:
        get in interface com.google.inject.Provider<Cache>
        Specified by:
        get in interface jakarta.inject.Provider<Cache>
        Specified by:
        get in interface javax.inject.Provider<Cache>