Files
iMES_Net/iMES.Core/Extensions/CacheKeyExtensions.cs

24 lines
533 B
C#
Raw Permalink Normal View History

2026-02-06 18:34:35 +08:00
using iMES.Core.Enums;
using System;
namespace iMES.Core.Extensions
{
public static class CacheKeyExtensions
{
public static string GetKey(this CPrefix prefix, object value)
{
return prefix.ToString() + value;
}
public static string GetUserIdKey(this int userId)
{
return CPrefix.UID.ToString() + userId;
}
public static string GetRoleIdKey(this int roleId)
{
return CPrefix.Role.ToString() + roleId;
}
}
}