示例#1
0
        public CASCHandlerBase(CASCConfig config, BackgroundWorkerEx worker)
        {
            Config = config;

            Logger.WriteLine("CASCHandlerBase: loading CDN indices...");

            using (var _ = new PerfCounter("CDNIndexHandler.Initialize()"))
            {
                CDNIndex = CDNIndexHandler.Initialize(config, worker);
            }

            Logger.WriteLine("CASCHandlerBase: loaded {0} CDN indexes", CDNIndex.Count);

            if (!config.OnlineMode)
            {
                CDNCache.Enabled = false;

                Logger.WriteLine("CASCHandlerBase: loading local indices...");

                using (var _ = new PerfCounter("LocalIndexHandler.Initialize()"))
                {
                    LocalIndex = LocalIndexHandler.Initialize(config, worker);
                }

                Logger.WriteLine("CASCHandlerBase: loaded {0} local indexes", LocalIndex.Count);
            }
        }
示例#2
0
        public CASCHandlerBase(CASCConfig config)
        {
            Config = config;

            CDNIndex = CDNIndexHandler.Initialize(config);

            if (!config.OnlineMode)
            {
                LocalIndex = LocalIndexHandler.Initialize(config);
            }
        }
示例#3
0
        public CASCHandlerBase(CASCConfig config)
        {
            Config = config;

            Debug.Log("CASCHandlerBase: Initializing Index Handler...");
            CDNIndex = CDNIndexHandler.Initialize(config);

            if (!config.OnlineMode)
            {
                CDNCache.Enabled = false;
                Debug.Log("CASCHandlerBase: Initializing Local Index Handler...");
                LocalIndex = LocalIndexHandler.Initialize(config);
            }
        }