コード例 #1
0
        /// <summary>
        /// Clear all entries belonging to the specified scope from the cache.
        /// </summary>
        public static void Clear(string scopeDelimiter, CacheContentType contentType)
        {
            // determine which cache to use
            CacheStore cacheStore = GetCacheStore(scope, scopeDelimiter, contentType);

            // access cache
            cacheStore.Lock.AcquireWriterLock(rwLockTimeOut);
            try
            {
                cacheStore.Clear();
                GentleStatistics.Reset(LogCategories.Cache);
            }
            finally
            {
                cacheStore.Lock.ReleaseWriterLock();
            }
        }
コード例 #2
0
 /// <summary>
 /// Clear all entries in all scopes from the cache.
 /// </summary>
 public static void Clear()
 {
     stores = new HybridDictionary();
     GentleStatistics.Reset(LogCategories.Cache);
 }