/// <summary> /// Clears the cache /// </summary> public virtual void Clear() { lock (InternalCache) { InternalCache.Clear(); } }
public object Clear() { lock (this) { var _size = InternalCache.Count; InternalCache.Clear(); LastRefresh = DateTime.MinValue; return(_size); } }
/// <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; } } }
/// <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; }
/// <inheritdoc /> public void Clear() => InternalCache.Clear();
public static void Clear() { InternalCache.Clear(); }