org.springframework.cache.guava.GuavaCacheManager Java Examples

The following examples show how to use org.springframework.cache.guava.GuavaCacheManager. 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 File: CacheConfig.java    From portal-de-servicos with 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 File: CacheConfig.java    From fullstop with 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 File: CacheConfig.java    From fullstop with 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 File: GuavaCacheConfig.java    From spring4-sandbox with Apache License 2.0 4 votes vote down vote up
@Override
@Bean
public CacheManager cacheManager() {
	return new GuavaCacheManager();
}