mirror of
https://github.com/cq-panda/Vue.NetCore.git
synced 2026-10-18 22:46:05 +08:00
24 lines
531 B
C#
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;
|
|
}
|
|
}
|
|
}
|