예제 #1
0
        /// <summary>
        /// Removes the object cache key.
        /// </summary>
        /// <param name="region">The region.</param>
        /// <param name="key">The key.</param>
        private static void RemoveObjectCacheKey(string region, string key)
        {
            var objectCacheReference = new CacheKeyReference {
                Region = region, Key = key
            };

            _objectCacheKeyReferences.Remove(objectCacheReference);
        }
예제 #2
0
        /// <summary>
        /// Adds the or updates object cache key.
        /// </summary>
        /// <param name="region">The region.</param>
        /// <param name="key">The key.</param>
        private static void AddOrUpdateObjectCacheKey(string region, string key)
        {
            var objectCacheReference = new CacheKeyReference {
                Region = region, Key = key
            };

            if (_objectCacheKeyReferences.Contains(objectCacheReference))
            {
                return;
            }

            _objectCacheKeyReferences.Add(objectCacheReference);
        }