feat: 新增用户信息缓存管理

This commit is contained in:
陈淳
2024-02-18 11:41:43 +08:00
parent efa87e0e1a
commit 9477ca0373
3 changed files with 78 additions and 19 deletions

View File

@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yi.Framework.Rbac.Domain.Shared.Dtos;
namespace Yi.Framework.Rbac.Domain.Shared.Caches
{
public class UserInfoCacheItem
{
public UserInfoCacheItem(UserRoleMenuDto info) { Info = info; }
/// <summary>
/// 存储的用户信息
/// </summary>
public UserRoleMenuDto Info { get; set; }
}
public class UserInfoCacheKey
{
public UserInfoCacheKey(Guid userId) { UserId = userId; }
public Guid UserId { get; set; }
public override string ToString()
{
return $"Yi:User:{UserId}";
}
}
}