System.Net.Cache.RequestCache.TryRemove C# (CSharp) Method

TryRemove() abstract private method

abstract private TryRemove ( string key ) : bool
key string
return bool
        internal abstract bool    TryRemove(string key);
        //

Usage Example

        //
        private void EnsureCacheRemoval(string retrieveKey)
        {
            // The entry can now be replaced as we are not going for cache entry metadata-only  update
            _RequestCache.UnlockEntry(_Validator.CacheStream);

            if (_Validator.StrictCacheErrors)
            {
                _RequestCache.Remove(retrieveKey);
            }
            else
            {
                _RequestCache.TryRemove(retrieveKey);
            }

            // We may need to remove yet another reference from the cache
            if (retrieveKey != _Validator.CacheKey)
            {
                if (_Validator.StrictCacheErrors)
                {
                    _RequestCache.Remove(_Validator.CacheKey);
                }
                else
                {
                    _RequestCache.TryRemove(_Validator.CacheKey);
                }
            }
        }
All Usage Examples Of System.Net.Cache.RequestCache::TryRemove