mirror of
https://github.com/zongzibinbin/MallChat.git
synced 2026-03-14 06:03:42 +08:00
Delete UserSummary cache after modifying user info
This commit is contained in:
@@ -39,6 +39,8 @@ public class UserCache {
|
|||||||
private RoleDao roleDao;
|
private RoleDao roleDao;
|
||||||
@Autowired
|
@Autowired
|
||||||
private UserRoleDao userRoleDao;
|
private UserRoleDao userRoleDao;
|
||||||
|
@Autowired
|
||||||
|
private UserSummaryCache userSummaryCache;
|
||||||
|
|
||||||
public Long getOnlineNum() {
|
public Long getOnlineNum() {
|
||||||
String onlineKey = RedisKey.getKey(RedisKey.ONLINE_UID_ZET);
|
String onlineKey = RedisKey.getKey(RedisKey.ONLINE_UID_ZET);
|
||||||
@@ -137,6 +139,8 @@ public class UserCache {
|
|||||||
|
|
||||||
public void userInfoChange(Long uid) {
|
public void userInfoChange(Long uid) {
|
||||||
delUserInfo(uid);
|
delUserInfo(uid);
|
||||||
|
//删除UserSummaryCache,前端下次懒加载的时候可以获取到最新的数据
|
||||||
|
userSummaryCache.delete(uid);
|
||||||
refreshUserModifyTime(uid);
|
refreshUserModifyTime(uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user