use of org.qi4j.spi.cache.Cache in project qi4j-sdk by Qi4j.
the class EhCachePoolMixin method createNewCache.
private <T> EhCacheImpl<T> createNewCache(String cacheId, Class<T> valueType) {
CacheConfiguration cc = createCacheConfiguration(cacheId);
// TODO: We also need all the other Configurations that are possible, like cacheLoaderFactoryConfiguration
net.sf.ehcache.Cache cache = new net.sf.ehcache.Cache(cc);
cacheManager.addCache(cache);
return new EhCacheImpl<>(cacheId, cache, valueType);
}
Aggregations