/// <summary> /// Reset the number of cached requests and clear the entire cache /// Mostly used for testing /// </summary> public void ResetCache() { if (cache != null) { cache.Dispose(); } cache = new SimpleCache(maxNumberOfCachedRequests); NumOfCachedRequests = 0; }
/// <summary> /// Reset the number of cached requests and clear the entire cache /// Mostly used for testing /// </summary> public void ResetCache(int?newMaxNumberOfCachedRequests = null) { if (newMaxNumberOfCachedRequests != null && newMaxNumberOfCachedRequests.Value == maxNumberOfCachedRequests) { return; } if (cache != null) { cache.Dispose(); } if (newMaxNumberOfCachedRequests != null) { maxNumberOfCachedRequests = newMaxNumberOfCachedRequests.Value; } cache = new SimpleCache(maxNumberOfCachedRequests); NumOfCachedRequests = 0; }
public static void Destory() { _cache?.Dispose(); }
/// <summary> /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// </summary> public void Dispose() { clrPdbReader.Dispose(); }