/// <summary> /// 设置用户模型到缓存 /// </summary> /// <param name="userId"></param> /// <param name="userInfo"></param> public void SetUserInfo(string userId, UserViewModel userInfo) { userId.CheckNotNullOrEmpty(nameof(userId)); userInfo.CheckNotNull(nameof(userInfo)); _cache.Add(CacheKeySupplier.UserModelCacheKey(userId), userInfo); }