This action will force synchronization from JbootProjects/jboot, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
package cache;import io.jboot.aop.annotation.Bean;import io.jboot.core.cache.annotation.CacheEvict;import io.jboot.core.cache.annotation.CachePut;import io.jboot.core.cache.annotation.Cacheable;import io.jboot.core.cache.annotation.CachesEvict;@Beanpublic class CacheServiceImpl implements CacheService {@Override@Cacheable(name = "mycache", key = "#(key)", unless = "key =='zhangsan'")public String cacheAble(String key) {System.out.println("cacheAble invoked!!!!");return key + " from CacheServiceImpl.cacheAble";}@Override@Cacheable(name = "mycache", key = "#(key)", liveSeconds = 5)public String cacheAbleLive(String key) {System.out.println("cacheAbleLive invoked!!!!");return key + " from CacheServiceImpl.cacheAbleLive";}@Override@CachePut(name = "mycache1111", key = "#(key)", liveSeconds = 15)public String putCache(String key) {return key + " from CacheServiceImpl.putCache";}/*** 只能删除指定name,key的缓存** @param key*/@Override@CachesEvict({@CacheEvict(name = "mycache", key = "*"), @CacheEvict(name = "mycache1111", key = "*")})public void cacheEvict(String key) {}/*** 只能删除指定name,key的缓存** @param key*/@Override@CacheEvict(name = "mycache", key = "*")public void cacheEvict1(String key) {throw new NullPointerException("xxxx");}}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。