-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
feature:Support_LRU_User_Info_Cache #156
feature:Support_LRU_User_Info_Cache #156
Conversation
...rd-route/src/main/java/com/crossoverjie/cim/route/service/impl/UserInfoCacheServiceImpl.java
Outdated
Show resolved
Hide resolved
cim-forward-route/src/main/java/com/crossoverjie/cim/route/config/BeanConfig.java
Outdated
Show resolved
Hide resolved
cim-forward-route/src/main/java/com/crossoverjie/cim/route/config/BeanConfig.java
Outdated
Show resolved
Hide resolved
cim-forward-route/src/main/java/com/crossoverjie/cim/route/config/BeanConfig.java
Outdated
Show resolved
Hide resolved
cim-forward-route/src/main/java/com/crossoverjie/cim/route/config/BeanConfig.java
Outdated
Show resolved
Hide resolved
@Autowired | ||
private RedisTemplate<String,String> redisTemplate ; | ||
|
||
@Autowired | ||
private LoadingCache<Long, CIMUserInfo> USER_INFO_MAP; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use camel case naming for variable name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, USER_INFO_MAP
has been replaced by userInfoMap
.
…vice/impl/UserInfoCacheServiceImpl.java Co-authored-by: crossoverJie <[email protected]>
…fig/BeanConfig.java Co-authored-by: crossoverJie <[email protected]>
…fig/BeanConfig.java Co-authored-by: crossoverJie <[email protected]>
…fig/BeanConfig.java Co-authored-by: crossoverJie <[email protected]>
…fig/BeanConfig.java Co-authored-by: crossoverJie <[email protected]>
… into feature_Support_LRU_User_Info_Cache
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #156 +/- ##
============================================
+ Coverage 37.14% 37.34% +0.20%
Complexity 301 301
============================================
Files 75 75
Lines 2221 2225 +4
Branches 252 251 -1
============================================
+ Hits 825 831 +6
+ Misses 1357 1356 -1
+ Partials 39 38 -1 ☔ View full report in Codecov by Sentry. |
cim-forward-route/src/main/java/com/crossoverjie/cim/route/config/BeanConfig.java
Outdated
Show resolved
Hide resolved
cim-forward-route/src/main/java/com/crossoverjie/cim/route/config/BeanConfig.java
Outdated
Show resolved
Hide resolved
…fig/BeanConfig.java Co-authored-by: crossoverJie <[email protected]>
…fig/BeanConfig.java Co-authored-by: crossoverJie <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution.
There is a TODO item in the list: The
User_Info_Map
is implemented usingConcurrentHashMap
. Although it will automatically expand, excessive expansion can lead to memory overflow. To prevent unlimited expansion, useLoadingCache
to load the cache instead.