init lserp cs 5.0

This commit is contained in:
cyf
2026-07-10 15:25:05 +08:00
commit 90f3fda86a
3799 changed files with 976868 additions and 0 deletions
@@ -0,0 +1,41 @@
using System;
using Zhaizj.Framework.Data;
using Zhaizj.Framework.DI;
using Zhaizj.Framework.Web;
namespace Zhaizj.Framework.Caching
{
/// <summary>
/// 缓存管理器
/// </summary>
public class CacheManager
{
/// <summary>
/// 获取 ApplicationCache
/// </summary>
/// <returns></returns>
public static IApplicationCache GetApplicationCache()
{
String cfgCache = DbConfig.Instance.ApplicationCacheManager;
if (strUtil.IsNullOrEmpty(cfgCache)) return defaultCache();
if (ObjectContext.Instance.TypeList.ContainsKey(cfgCache) == false) return defaultCache();
return ObjectContext.GetByType(cfgCache) as IApplicationCache;
}
private static IApplicationCache defaultCache()
{
return new ApplicationCache();
}
}
}