请大神指点,Spring3.2.17版本框架,在使用Spring Cache的时候,怎么实现可自定义本次缓存KEY的有效期,因为业务不同,需要设置的有效期也不一样:
@Cacheable(value="logCache",key="#root.methodName + #exceptionLogBean.logid")
public ExceptionLogBean getLogInfo(ExceptionLogBean exceptionLogBean){
return exceptionLogService.selectLogByLogid(exceptionLogBean);
}
key有效期有cache.xml配置文件中设置