lob-form-service.2.2.4.source-code.dialob-form-service-cache-context.xml Maven / Gradle / Ivy
<?xml version="1.0" encoding="utf-8" ?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cache="http://www.springframework.org/schema/cache" xmlns:aop="http://www.springframework.org/schema/aop" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd"> <cache:advice id="formDatabaseCacheAdvice"> <cache:caching cache="formCache"> <cache:cacheable method="findOne" key="{'form',#a0,#a1,#a2}"/> <cache:cacheable method="exists" key="{'exists',#a0,#a1,null}"/> <cache:cache-evict method="delete" all-entries="true"/> <cache:cache-put method="save" key="{'form',#a0,#result.id,null}"/> <cache:cache-put method="save" key="{'form',#a0,#result.id,#result.rev}"/> <cache:cache-evict method="save" key="{'exists',#a0,#result.id,null}"/> </cache:caching> </cache:advice> <aop:config proxy-target-class="false"> <aop:advisor advice-ref="formDatabaseCacheAdvice" pointcut="execution(* io.dialob.form.service.api.FormDatabase.*(..))"/> </aop:config> </beans>