-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
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
本地缓存实时失效方案 #817
Comments
看下文档,指定个broadcastChannel就行了 |
看到了,指定broadcastchannel之后失效,通过cacheManager将缓存对象更新后,redis远程缓存也会更新,同时其他节点本地缓存会同步更新对吗,另外,broadcastChannel是如何实现的呢 |
通过pub/sub发通知,让其它进程的对应cache失效 |
在方法上通过@cached注解添加的缓存,syncLocal默认值为false吗,如果为false,怎么修改呢 |
指定broadcastChannel后,在相应的Cache那里,比如Cached注解那里指定个属性syncLocal = true就行了。 默认值是多少你可以看下代码。如果是windows,在编辑器里面把光标放到Cached上面,在Intellji IDEA里面按Ctrl+B,如果是Eclipse按F3,可以查看代码。 |
测试ok了,感谢 |
你使用的是哪个版本?我这边使用了最新版本不行哦,其他节点不会失效。 |
同问,一样的不会失效,你有找到原因吗 |
2.7.6 版本,使用Redisson |
分布式场景下,使用二级缓存时,有推荐的缓存失效方案吗
The text was updated successfully, but these errors were encountered: