We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@PostConstruct public void init() { QuickConfig idQc = QuickConfig.newBuilder(":user:cache:id:") .cacheType(CacheType.BOTH) .expire(Duration.ofSeconds(60)) .syncLocal(true) .build(); idUserCache = cacheManager.getOrCreateCache(idQc); }
@cached(name = ":user:cache:id:", key = "#userId", expire = 100) @cacherefresh(refresh = 30) public User findById(Long userId) { System.out.println("调用几次这个"); return userMapper.findById(userId); } cacheManager 是不是对全局有效,会覆盖后面 @cached @cacherefresh的策略
The text was updated successfully, but these errors were encountered:
area和name相同的就是同一个,只能定义一次
Sorry, something went wrong.
No branches or pull requests
@PostConstruct
public void init() {
QuickConfig idQc = QuickConfig.newBuilder(":user:cache:id:")
.cacheType(CacheType.BOTH)
.expire(Duration.ofSeconds(60))
.syncLocal(true)
.build();
idUserCache = cacheManager.getOrCreateCache(idQc);
}
@cached(name = ":user:cache:id:", key = "#userId", expire = 100)
@cacherefresh(refresh = 30)
public User findById(Long userId) {
System.out.println("调用几次这个");
return userMapper.findById(userId);
}
cacheManager 是不是对全局有效,会覆盖后面 @cached @cacherefresh的策略
The text was updated successfully, but these errors were encountered: