def get(self, requestId, userId): if RedisUtils.exists(userId) is True: userInfo = self.__userInfoMap[userId] RedisUtils.set(userId, userInfo) rootLogger.debug(requestId + "UserRedisCache get:" + str(userInfo)) return userInfo
def put(self, requestId, userId, userInfo): if RedisUtils.exists(userId) is False: RedisUtils.set(userId, userInfo) rootLogger.debug(requestId + "UserRedisCache put:" + str(userInfo)) return True return False