List of usage examples for org.springframework.cache.interceptor CompositeCacheOperationSource CompositeCacheOperationSource
public CompositeCacheOperationSource(CacheOperationSource... cacheOperationSources)
From source file:org.springframework.cache.interceptor.CacheAspectSupport.java
/** * Set one or more cache operation sources which are used to find the cache * attributes. If more than one source is provided, they will be aggregated * using a {@link CompositeCacheOperationSource}. *//*from ww w.ja v a2s . c om*/ public void setCacheOperationSources(CacheOperationSource... cacheOperationSources) { Assert.notEmpty(cacheOperationSources, "At least 1 CacheOperationSource needs to be specified"); this.cacheOperationSource = (cacheOperationSources.length > 1 ? new CompositeCacheOperationSource(cacheOperationSources) : cacheOperationSources[0]); }
From source file:org.springframework.cache.interceptor.YJFCacheAspectSupport.java
/** * Set one or more cache operation sources which are used to find the cache * attributes. If more than one source is provided, they will be aggregated using a * {@link CompositeCacheOperationSource}. * @param cacheOperationSources must not be {@code null} *//*from w ww . j a v a2 s .c o m*/ public void setCacheOperationSources(CacheOperationSource... cacheOperationSources) { Assert.notEmpty(cacheOperationSources); this.cacheOperationSource = (cacheOperationSources.length > 1 ? new CompositeCacheOperationSource(cacheOperationSources) : cacheOperationSources[0]); }