Esempio n. 1
0
 /// <summary>
 /// Clears the cache
 /// </summary>
 public virtual void Clear()
 {
     lock (InternalCache)
     {
         InternalCache.Clear();
     }
 }
Esempio n. 2
0
 public object Clear()
 {
     lock (this) {
         var _size = InternalCache.Count;
         InternalCache.Clear();
         LastRefresh = DateTime.MinValue;
         return(_size);
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Clears all Core caches
 /// </summary>
 /// <param name="forceClear">method want do nothing if cache option is KeepExistingCacheAlive. You can force clear caches anyway by giving true</param>
 public virtual void ClearCaches(bool forceClear)
 {
     if (forceClear || CacheOptions.ClearExistingCache == Settings.CacheOptions)
     {
         lock (_assembliesLock)
         {
             InternalCache.Clear();
             InternalFactories.Clear();
             _initalized = false;
         }
     }
 }
Esempio n. 4
0
 /// <summary>
 /// Performs application-defined tasks associated with freeing, releasing, or resetting
 /// unmanaged resources.
 /// </summary>
 public override void Dispose()
 {
     if (InternalCache is null)
     {
         return;
     }
     foreach (var Item in InternalCache.Values)
     {
         Item.Dispose();
     }
     InternalCache.Clear();
     InternalCache = null;
 }
Esempio n. 5
0
 /// <inheritdoc />
 public void Clear() => InternalCache.Clear();
Esempio n. 6
0
 public static void Clear()
 {
     InternalCache.Clear();
 }