lixiaojun
2024-08-22 6db288304fd93521c0e20455f4b0bd98ecc3db90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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);
        }
 
 
    }
}