BusterWood.Caching/CacheExtensions.cs
/// <summary>Removes multiple keys from the cache</summary>
Removes multiple keys from the cache
Removes multiple keys from the cache
public static void RemoveRange<TKey, TValue>(this ICache<TKey, TValue> cache, IEnumerable<TKey> keys)
        {
            if (cache == null) throw new ArgumentNullException(nameof(cache));
            if (keys == null) throw new ArgumentNullException(nameof(keys));
            lock (cache.SyncRoot)
            {
                foreach (var k in keys)
                {
                    cache.Remove(k);
                }
            }
        }
public static void RemoveRange < TKey , TValue > ( this ICache < TKey , TValue > cache , IEnumerable < TKey > keys ) { if ( cache == null ) throw new ArgumentNullException ( nameof ( cache ) ) ; if ( keys == null ) throw new ArgumentNullException ( nameof ( keys ) ) ; lock ( cache . SyncRoot ) { foreach ( var k in keys ) { cache . Remove ( k ) ; } } }
Removes multiple keys from the cache
Removes multiple keys from the cache
ICache<TKey, TValue>
this
keys
IEnumerable<TKey>