public void InvalidateCollection(SoodaCachedCollection collection) { LruCache cachedCollectionsDependentOnClass = (LruCache)_collectionsDependentOnClass[collection.RootClassName]; cachedCollectionsDependentOnClass.Remove(collection.CollectionKey); _collectionCache.Remove(collection.CollectionKey); }
private void RegisterDependentCollectionClass(string cacheKey, string dependentClassName, TimeSpan expirationTimeout, bool slidingExpiration) { LruCache cache = (LruCache)_collectionsDependentOnClass[dependentClassName]; if (cache == null) { cache = new LruCache(-1); _collectionsDependentOnClass[dependentClassName] = cache; } // this is actually a set cache.Set(cacheKey, _marker, expirationTimeout, slidingExpiration); }