io.quarkus.cache.runtime.CacheManagerInitializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-cache Show documentation
Show all versions of quarkus-cache Show documentation
Enable application data caching in CDI beans
package io.quarkus.cache.runtime;
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.context.Initialized;
import javax.enterprise.event.Observes;
import io.quarkus.cache.CacheManager;
/**
* This class is used to eagerly create the {@link CacheManager} bean instance at STATIC_INIT execution time.
*/
public class CacheManagerInitializer {
private static void onStaticInit(@Observes @Initialized(ApplicationScoped.class) Object event, CacheManager cacheManager) {
cacheManager.getCacheNames();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy