Пример #1
0
 private CDNIndexHandler(CASCConfig cascConfig, ProgressReportSlave worker, Cache cache)
 {
     _config     = cascConfig;
     _worker     = worker;
     _downloader = new SyncDownloader();
     _cache      = cache;
 }
Пример #2
0
        public Cache(string path)
        {
            string cachePath = Path.Combine(Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName), path);

            CDNCachePath = Path.Combine(cachePath, "CDN");
            APMCachePath = Path.Combine(cachePath, "APM");

            _downloader = new SyncDownloader();

            if (CacheCDN)
            {
                if (!Directory.Exists(CDNCachePath))
                {
                    Directory.CreateDirectory(CDNCachePath);
                }
            }

            if (CacheAPM)
            {
                if (!Directory.Exists(APMCachePath))
                {
                    Directory.CreateDirectory(APMCachePath);
                }
            }
        }
Пример #3
0
        public void Clear()
        {
            _cdnIndexData.Clear();
            _cdnIndexData = null;

            _config     = null;
            _worker     = null;
            _downloader = null;
        }