namespace Yw.Service.Run
|
{
|
/// <summary>
|
/// LCache辅助类
|
/// </summary>
|
internal class LCacheCreateHelper
|
{
|
|
|
/// <summary>
|
/// 创建LCache(无缓存)
|
/// </summary>
|
public static T CreateLCache<T>()
|
{
|
var dbType = Settings.RunParasHelper.Run.LCache.LCacheType;
|
return Yw.LCacheFactory.CreateLCache<T>(dbType);
|
}
|
|
/// <summary>
|
/// 创建LCache(内部缓存)
|
/// </summary>
|
public static T CreateLCache2<T>()
|
{
|
var dbType = Settings.RunParasHelper.Run.LCache.LCacheType;
|
var enableCache = Settings.RunParasHelper.Run.LCache.Factory.EnableCache;
|
return Yw.LCacheFactory.CreateLCache2<T>(dbType, enableCache);
|
}
|
|
/// <summary>
|
/// 创建LCache(MemoryCache缓存)
|
/// </summary>
|
public static T CreateLCache3<T>()
|
{
|
var dbType = Settings.RunParasHelper.Run.LCache.LCacheType;
|
var enableCache = Settings.RunParasHelper.Run.LCache.Factory.EnableCache;
|
var cacheTime = Settings.RunParasHelper.Run.LCache.Factory.CacheTime;
|
return Yw.LCacheFactory.CreateLCache3<T>(dbType, enableCache, cacheTime);
|
}
|
|
|
}
|
}
|