Ejemplo n.º 1
0
        public void InvalidateCollection(SoodaCachedCollection collection)
        {
            LruCache cachedCollectionsDependentOnClass =
                (LruCache)_collectionsDependentOnClass[collection.RootClassName];

            cachedCollectionsDependentOnClass.Remove(collection.CollectionKey);
            _collectionCache.Remove(collection.CollectionKey);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }