admin/src/SimpleAdmin.Api/Auth/IRbacAuthCache.cs
2026-07-18 23:39:29 +08:00

19 lines
478 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

namespace SimpleAdmin.Api.Auth;
/// <summary>
/// RBAC 登录用户信息 / 菜单缓存。通过 epoch 批量失效,避免角色权限变更后脏读。
/// </summary>
public interface IRbacAuthCache
{
string UserInfoKey(Guid userId);
string AllMenusKey();
void InvalidateUser(Guid userId);
/// <summary>
/// 角色/菜单等全局变更时 bump epoch,使全部 userInfo 与全量菜单缓存失效。
/// </summary>
void InvalidateAll();
}