Esempio n. 1
0
        public void RemoveAll(IEnumerable <string> keys)
        {
            if (keys == null || keys.Count() == 0)
            {
                throw new ArgumentNullException(nameof(keys));
            }

            _cache.RemoveAll(keys);
        }
Esempio n. 2
0
        /// <summary>
        /// Removes all.
        /// </summary>
        /// <param name="cacheKeys">Cache keys.</param>
        public override void BaseRemoveAll(IEnumerable <string> cacheKeys)
        {
            ArgumentCheck.NotNullAndCountGTZero(cacheKeys, nameof(cacheKeys));

            if (_options.EnableLogging)
            {
                _logger?.LogInformation($"RemoveAll : cacheKeys = {string.Join(",", cacheKeys)}");
            }

            _cache.RemoveAll(cacheKeys);
        }
Esempio n. 3
0
        /// <summary>
        /// Removes all.
        /// </summary>
        /// <param name="cacheKeys">Cache keys.</param>
        public void RemoveAll(IEnumerable <string> cacheKeys)
        {
            ArgumentCheck.NotNullAndCountGTZero(cacheKeys, nameof(cacheKeys));

            cacheKeys = cacheKeys.Select(x => BuildCacheKey(this._name, x));

            if (_options.EnableLogging)
            {
                _logger?.LogInformation($"RemoveAll : cacheKeys = {string.Join(",", cacheKeys)}");
            }

            _cache.RemoveAll(cacheKeys);
        }
        /// <summary>
        /// Removes all.
        /// </summary>
        /// <param name="cacheKeys">Cache keys.</param>
        public override void BaseRemoveAll(IEnumerable <string> cacheKeys)
        {
            ArgumentCheck.NotNullAndCountGTZero(cacheKeys, nameof(cacheKeys));

            Logger?.LogDebug("RemoveAll : cacheKeys = {0}", string.Join(",", cacheKeys));

            _cache.RemoveAll(cacheKeys);
        }