Search in sources :

Example 1 with CacheableInterceptor

use of cn.taketoday.cache.interceptor.CacheableInterceptor in project today-framework by TAKETODAY.

the class ProxyCachingConfiguration method cacheableInterceptor.

@Aspect
@Component
@Advice(Cacheable.class)
@ConditionalOnMissingBean
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
CacheableInterceptor cacheableInterceptor(CacheManager cacheManager, CacheExpressionOperations operations) {
    CacheableInterceptor cacheableInterceptor = new CacheableInterceptor(cacheManager);
    cacheableInterceptor.setExpressionOperations(operations);
    return cacheableInterceptor;
}
Also used : CacheableInterceptor(cn.taketoday.cache.interceptor.CacheableInterceptor) Role(cn.taketoday.context.annotation.Role) ConditionalOnMissingBean(cn.taketoday.context.condition.ConditionalOnMissingBean) Advice(cn.taketoday.aop.support.annotation.Advice) Aspect(cn.taketoday.aop.support.annotation.Aspect) Component(cn.taketoday.lang.Component)

Aggregations

Advice (cn.taketoday.aop.support.annotation.Advice)1 Aspect (cn.taketoday.aop.support.annotation.Aspect)1 CacheableInterceptor (cn.taketoday.cache.interceptor.CacheableInterceptor)1 Role (cn.taketoday.context.annotation.Role)1 ConditionalOnMissingBean (cn.taketoday.context.condition.ConditionalOnMissingBean)1 Component (cn.taketoday.lang.Component)1