Esempio n. 1
0
        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();
            }
        }
Esempio n. 2
0
 public static void Init(CacheOption option)
 {
     dateCache = new DataCacheCore(option);
     CacheType = option.CacheType;
 }