Example #1
0
        /// <summary>Removes the value with the given key from the cache. This method does not need to be called within the context of a
        /// <see cref="System.Transactions.Transaction"/>, but if there is a current transaction, it will be used.
        /// </summary>
        public bool Remove(TKey key)
        {
            TransactionState state = GetWriteState();

            return(state == null?cache.Remove(key) : state.Remove(key));
        }