Example #1
0
 /// <summary>
 /// Clears the specified cache entry. If the key parameter is not provided, all
 /// entries in the cache namespace are removed.
 /// </summary>
 /// <param name="key">Unique key of the cache entry to update</param>
 public void Clear(string key = null)
 {
     if (string.IsNullOrWhiteSpace(key))
     {
         _cache.ClearAll(CreateCacheKey(string.Empty));
     }
     else
     {
         _cache.ClearEntry(CreateCacheKey(key));
     }
 }
Example #2
0
 /// <summary>
 /// Clears all object caches created with the factory of all data
 /// </summary>
 public void Clear()
 {
     _memoryCache.ClearAll();
 }