names.forEach(metricRegistry::remove);
log.info("Closing Cache Manager");
cacheManager.shutdown();
}
@Bean
<BUG>public CacheManager cacheManager() {
log.debug("Starting Ehcache");</BUG>
cacheManager = net.sf.ehcache.CacheManager.create();
<BUG>cacheManager.getConfiguration().setMaxBytesLocalHeap(env.getProperty("jhipster.cache.ehcache.maxBytesLocalHeap", String.class, "16M"));
</BUG>
log.debug("Registering Ehcache Metrics gauges");

names.forEach(metricRegistry::remove);
log.info("Closing Cache Manager");
cacheManager.shutdown();
}
@Bean
public CacheManager cacheManager(JHipsterProperties jHipsterProperties) {
log.debug("Starting Ehcache");
cacheManager = net.sf.ehcache.CacheManager.create();
cacheManager.getConfiguration().setMaxBytesLocalHeap(jHipsterProperties.getCache().getEhcache().getMaxBytesLocalHeap());
log.debug("Registering Ehcache Metrics gauges");
