Java Code Examples for org.springframework.cache.guava.GuavaCacheManager

The following examples show how to use org.springframework.cache.guava.GuavaCacheManager. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: portal-de-servicos   Source File: CacheConfig.java    License: MIT License 4 votes vote down vote up
@Bean
public CacheManager cacheManager() {
    GuavaCacheManager manager = new GuavaCacheManager();
    manager.setCacheBuilder(CacheBuilder.newBuilder().expireAfterWrite(10, MINUTES));
    return manager;
}
 
Example 2
Source Project: fullstop   Source File: CacheConfig.java    License: Apache License 2.0 4 votes vote down vote up
private static CacheManager buildCacheManager(final String spec) {
    final GuavaCacheManager cacheManager = new GuavaCacheManager();
    cacheManager.setCacheBuilderSpec(parse(spec));
    return cacheManager;
}
 
Example 3
Source Project: fullstop   Source File: CacheConfig.java    License: Apache License 2.0 4 votes vote down vote up
private static CacheManager buildCacheManager(final String spec) {
    final GuavaCacheManager cacheManager = new GuavaCacheManager();
    cacheManager.setCacheBuilderSpec(parse(spec));
    return cacheManager;
}
 
Example 4
Source Project: spring4-sandbox   Source File: GuavaCacheConfig.java    License: Apache License 2.0 4 votes vote down vote up
@Override
@Bean
public CacheManager cacheManager() {
	return new GuavaCacheManager();
}