public void Insert(string key, object value) { VerifyInstance(); _inner.Insert(key, value); OnInsert?.Invoke(new CacheEventArgs(CacheOperation.Insert, key, CacheKeyHelper.GetResourceKeyFromCacheKey(key))); }
public void Remove(string key) { VerifyInstance(); _inner.Remove(key.ToLower()); OnRemove?.Invoke(new CacheEventArgs(CacheOperation.Remove, key, CacheKeyHelper.GetResourceKeyFromCacheKey(key))); }
public void Insert(string key, object value) { VerifyInstance(); var resourceKey = CacheKeyHelper.GetResourceKeyFromCacheKey(key); _inner.Insert(key, value); KnownResourceKeys.TryAdd(resourceKey, null); OnInsert?.Invoke(new CacheEventArgs(CacheOperation.Insert, key, resourceKey)); }
public void Insert(string key, object value, bool insertIntoKnownResourceKeys) { VerifyInstance(); _inner.Insert(key.ToLower(), value, insertIntoKnownResourceKeys); var resourceKey = CacheKeyHelper.GetResourceKeyFromCacheKey(key); if (insertIntoKnownResourceKeys) { _knownResourceKeys.TryAdd(resourceKey, null); } OnInsert?.Invoke(new CacheEventArgs(CacheOperation.Insert, key, resourceKey)); }
public void Remove(string key) { _inner.Remove(key); OnRemove?.Invoke(new CacheEventArgs(CacheOperation.Remove, key, CacheKeyHelper.GetResourceKeyFromCacheKey(key))); }
internal bool AreKnownKeysStored() { return(_inner.Get(CacheKeyHelper.BuildKey("KnownKeysSynched")) as bool? ?? false); }
internal void SetKnownKeysStored() { _inner.Insert(CacheKeyHelper.BuildKey("KnownKeysSynched"), true, false); }