Search in sources :

Example 1 with CacheEvictInterceptor

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

the class ProxyCachingConfiguration method cacheEvictInterceptor.

@Aspect
@Component
@ConditionalOnMissingBean
@Advice(CacheEvict.class)
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
CacheEvictInterceptor cacheEvictInterceptor(CacheManager cacheManager, CacheExpressionOperations operations) {
    CacheEvictInterceptor cacheEvictInterceptor = new CacheEvictInterceptor(cacheManager);
    cacheEvictInterceptor.setExpressionOperations(operations);
    return cacheEvictInterceptor;
}
Also used : CacheEvictInterceptor(cn.taketoday.cache.interceptor.CacheEvictInterceptor) 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 CacheEvictInterceptor (cn.taketoday.cache.interceptor.CacheEvictInterceptor)1 Role (cn.taketoday.context.annotation.Role)1 ConditionalOnMissingBean (cn.taketoday.context.condition.ConditionalOnMissingBean)1 Component (cn.taketoday.lang.Component)1