Example #1
0
        /// <summary>
        /// Removes an entry from the cache
        /// </summary>
        /// <param name="key">The key of the cache entry to be removed</param>
        public void Remove(string key)
        {
            if (key == null)
            {
                throw new ArgumentNullException("key");
            }
            long entrySize = RemoveEntry(key);

            lock (_cacheLock)
            {
                CacheSize -= entrySize;
            }
            CacheEvictionPolicy.NotifyRemove(key);
        }