public DataCacheCore(CacheOption option = null) { if (option == null) { return; } _cacheOption = option; switch (option.CacheType) { case CacheType.Redis: // dataCacheProvider = new YSWL.Common.RedisDataCache(option.ReadWriteHosts, option.ReadOnlyHosts, option.DefaultDb); break; case CacheType.IIS: dataCacheProvider = new YSWL.Common.IISDataCache(); break; default: throw new ArgumentOutOfRangeException(); } }
public static void Init(CacheOption option) { dateCache = new DataCacheCore(option); CacheType = option.CacheType; }