YD_SmartSports.Api/VOL.Core/Extensions/CacheKeyExtensions.cs

22 lines
516 B
C#
Raw Permalink Normal View History

2025-06-06 16:00:39 +08:00
using VOL.Core.Enums;
namespace VOL.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;
}
}
}