use of org.springframework.cache.concurrent.ConcurrentMapCacheManager in project spring-boot by spring-projects.
the class SimpleCacheConfiguration method cacheManager.
@Bean
public ConcurrentMapCacheManager cacheManager() {
ConcurrentMapCacheManager cacheManager = new ConcurrentMapCacheManager();
List<String> cacheNames = this.cacheProperties.getCacheNames();
if (!cacheNames.isEmpty()) {
cacheManager.setCacheNames(cacheNames);
}
return this.customizerInvoker.customize(cacheManager);
}
use of org.springframework.cache.concurrent.ConcurrentMapCacheManager in project spring-boot by spring-projects.
the class CacheAutoConfigurationTests method simpleCacheExplicit.
@Test
public void simpleCacheExplicit() {
load(DefaultCacheConfiguration.class, "spring.cache.type=simple");
ConcurrentMapCacheManager cacheManager = validateCacheManager(ConcurrentMapCacheManager.class);
assertThat(cacheManager.getCacheNames()).isEmpty();
}
use of org.springframework.cache.concurrent.ConcurrentMapCacheManager in project spring-boot by spring-projects.
the class CacheAutoConfigurationTests method cacheManagerFromSupportBackOff.
@Test
public void cacheManagerFromSupportBackOff() {
load(CustomCacheManagerFromSupportConfiguration.class);
ConcurrentMapCacheManager cacheManager = validateCacheManager(ConcurrentMapCacheManager.class);
assertThat(cacheManager.getCacheNames()).containsOnly("custom1");
}
use of org.springframework.cache.concurrent.ConcurrentMapCacheManager in project spring-security by spring-projects.
the class SpringCacheBasedTicketCacheTests method initCacheManaer.
// ~ Methods
// ========================================================================================================
@BeforeClass
public static void initCacheManaer() {
cacheManager = new ConcurrentMapCacheManager();
cacheManager.getCache("castickets");
}
use of org.springframework.cache.concurrent.ConcurrentMapCacheManager in project spring-security by spring-projects.
the class SpringCacheBasedAclCacheTests method initCacheManaer.
@BeforeAll
public static void initCacheManaer() {
cacheManager = new ConcurrentMapCacheManager();
// Use disk caching immediately (to test for serialization issue reported in
// SEC-527)
cacheManager.getCache("springcasebasedacltests");
}
Aggregations