1.添加 serverId 用于避免处理由自己发出的消息。2.实现caffeine的接口,主要是添加了getAll, putAll功能 #21
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
serverId 我这里是用redis自增id做的,没有考虑uuid是因为它太长了。
getAll, putAll 批处理方法在缓存预热时有着碾压级别的速度,在普通的业务中也有着不错的速度。不过当然了,用不了@Cacheable注解。
这里实现的caffeine接口与caffeine官方定义的有一点不同,它允许存入null值。