You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DSWMS/开发版dev/Vue.NetCore/Vue.Net/VOL.Core/Extensions/CacheKeyExtensions.cs

24 lines
531 B
C#

using VOL.Core.Enums;
using System;
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;
}
}
}