XilongPei / Openparts

MIT License
3 stars 1 forks source link

每个用户可以操作的功能信息全部缓存到Redis中,当用户量巨大时,Redis压力过大 #60

Open XilongPei opened 6 years ago

XilongPei commented 6 years ago

每个用户可以操作的功能信息全部缓存到Redis中,当用户量巨大时,大部分信息是重复的,因为大部分用户的功能集是一样的。 String key = RedisConstant.PERMISSION_PRE + userId; 合适的时候,要以角色为单位缓存这些数据。

XilongPei commented 6 years ago

optimize the Redis cache for getFunctionList() commit: https://github.com/XilongPei/Openparts/commit/8ef6f1792eb00f4cf1006d286cde01596f70b191

XilongPei commented 6 years ago

当一个用户logout时,会清理与他相关的Redis cache的。 RedisSessionDao.delete(Session session)

XilongPei commented 6 years ago

如何使用RedisTemplate访问Redis数据结构 https://www.jianshu.com/p/7bf5dc61ca06

XilongPei commented 6 years ago

[Redis] add getting method for: HashOperations, ListOperations, SetOperations commit: https://github.com/XilongPei/Openparts/commit/940c208c3969ae1f73c9c3d8fc02d1276d30e6e4

XilongPei commented 6 years ago

store online uid into a Redis set commit: https://github.com/XilongPei/Openparts/commit/434af57b9c37cf3a0e82b1026d3200057fac36e7