/// <summary>
        /// Flush All Cached Item.
        /// </summary>
        public void Flush()
        {
            ////new instance
            //_cache = new MemoryCache(new MemoryCacheOptions());

            foreach (var item in _cacheKeys)
            {
                _cache.Remove(item);
            }

            _cacheKeys.Clear();
        }
Example #2
0
        /// <summary>
        /// Flush All Cached Item.
        /// </summary>
        public void Flush()
        {
            if (_options.EnableLogging)
            {
                _logger?.LogInformation("Flush");
            }

            foreach (var item in _cacheKeys)
            {
                _cache.Remove(item);
            }

            _cacheKeys.Clear();
        }