/// <summary> /// Async invalidate a cache value /// </summary> /// <param name="cacheKey">The cache key to invalidate</param> public void InvalidateValue(string cacheKey) { // Delete from local cache if present _inMemoryCacheProvider.Remove(cacheKey); // Delete from distributed cache if present _distributedCacheProvider.Remove(cacheKey); }
public void Remove() { // Arrange string cacheKey = "Unit-Test-Cache"; _innerCacheMock.Setup(ic => ic.Remove(cacheKey)); // Act _cacheProvider.Remove(cacheKey); // Assert _innerCacheMock.Verify(ic => ic.Remove(cacheKey)); }