public string SignIn(UserModel user) { var token = Guid.NewGuid().ToString(); RedisCachedHelper.Set(token, user); return(token); }
public void ReloadUserAmountCache(decimal amount) { var user = CurrentUser; user.Amount = amount; RedisCachedHelper.Set(APIToken, user); }
public bool Authoriz() { var user = CurrentUser; //更新缓存时间 if (user != null) { RedisCachedHelper.Set(APIToken, user); } return(CurrentUser != null); }