Exemple #1
0
        public void ClearCachedResults()
        {
            _cache.Dispose();
            var options = new MemoryCacheOptions {
                ExpirationScanFrequency = TimeSpan.FromMinutes(30)
            };

            _cache = new Microsoft.Extensions.Caching.Memory.MemoryCache(options);
        }
 /// <inheritdoc />
 public override async Task ClearAsync()
 {
     _memoryCache.Dispose();
     _memoryCache = new Microsoft.Extensions.Caching.Memory.MemoryCache(_cacheOptions);
     await Task.FromResult(0);
 }
 public override void Clear()
 {
     _memoryCache.Dispose();
     _memoryCache = new Microsoft.Extensions.Caching.Memory.MemoryCache(new OptionsWrapper <MemoryCacheOptions>(new MemoryCacheOptions()));
 }
Exemple #4
0
 public void Dispose()
 {
     _memoryCache.Dispose();
 }