Skip to content

Commit

Permalink
feature_Support_LRU_User_Info_Cache
Browse files Browse the repository at this point in the history
  • Loading branch information
cmgyqjj committed Sep 22, 2024
1 parent 6e08eb7 commit a727b1b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ public class UserInfoCacheServiceImpl implements UserInfoCacheService {
private RedisTemplate<String,String> redisTemplate ;

@Resource(name = "userInfoCache")
private LoadingCache<Long, CIMUserInfo> USER_INFO_MAP;
private LoadingCache<Long, CIMUserInfo> userInfoMap;

@Override
public Optional<CIMUserInfo> loadUserInfoByUserId(Long userId) {
//Retrieve user information using a second-level cache.
CIMUserInfo cimUserInfo = USER_INFO_MAP.getUnchecked(userId);
CIMUserInfo cimUserInfo = userInfoMap.getUnchecked(userId);
return Optional.ofNullable(cimUserInfo);
}

Expand Down

0 comments on commit a727b1b

Please sign in to comment.