Esempio n. 1
0
 private void setUserCache(String appId, String sessionToken, BaasUser user) {
   ValueOperations<String, String> ops = redisTemplate.opsForValue();
   ops.set(
       "App_" + appId + USER_CLASS_NAME + "_" + sessionToken, jsonUtil.writeValueAsString(user));
 }
Esempio n. 2
0
 private BaasUser getUserCache(String appId, String sessionToken) {
   ValueOperations<String, String> ops = redisTemplate.opsForValue();
   String userStr = ops.get("App_" + appId + USER_CLASS_NAME + "_" + sessionToken);
   return jsonUtil.readValue(userStr, BaasUser.class);
 }