コード例 #1
0
        public CacheImages(CacheImageOptions options)
        {
            _options         = options;
            _cacheDictionary = new ConcurrentDictionary <string, CacheHeader>();
            DirectoryInfo info = new DirectoryInfo(_options.CachePath);

            if (info.Exists)
            {
                info.Delete(true);
            }
        }
コード例 #2
0
 public CacheImagesMiddleware(RequestDelegate next, CacheImageOptions options)
 {
     _nextDelegate = next;
     _cacheImages  = new CacheImages(options);
 }