using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IStation.Service
{
///
/// 缓存辅助类
///
internal class CacheHelper
{
private const string _cacheKeyPrefix = "*Default_Job_Prefix*";//缓存键前缀
///
/// 获取缓存键
///
public static string GetCacheKey(string keyContent)
{
return string.Format("{0}_{1}", _cacheKeyPrefix, keyContent);
}
///
/// 清除全部
///
public static void Clear()
{
MemoryCacheHelper.Remove((key) =>
{
return key.StartsWith(_cacheKeyPrefix);
});
}
}
}