Пример #1
0
        /*
         * private void RemoveUIntDataEntityFromCache(TEntity entity)
         * {
         *  var dataEntity = entity as UIntDataEntity;
         *  if (dataEntity != null)
         *  {
         *      // ReSharper disable once PossibleInvalidOperationException
         *      var itemCacheKey = GetCacheKey(new object[] {dataEntity.DatabaseId.Value});
         *      lock (CacheLock)
         *      {
         *          Cache.Clear(itemCacheKey);
         *      }
         *  }
         * }
         */

        private void RemoveIntDataEntityFromCache(TEntity entity)
        {
            // var dataEntity = entity as IntDataEntity;
            var dataEntity = entity;

            if (dataEntity != null)
            {
                // ReSharper disable once PossibleInvalidOperationException
                var itemCacheKey = GetCacheKey(new object[] { dataEntity.Id.Value });
                lock (CacheLock)
                {
                    Cache.Clear(itemCacheKey);
                }
            }
        }
Пример #2
0
 public void Clear()
 {
     _cache.Clear();
 }
Пример #3
0
 public virtual void Clear()
 {
     _cache.Clear();
 }
Пример #4
0
 /// <summary>
 /// Clears all items in the web directory cache. This also clears out
 /// the pages cache because page routes are dependent on web directories.
 /// </summary>
 public void Clear()
 {
     _cache.Clear();
     _pageCache.Clear();
 }
Пример #5
0
        public virtual void Clear()
        {
            IObjectCache cache = GetObjectCache();

            cache.Clear();
        }
 public void Handle(AccessRightsChanged domainEvent)
 {
     _objectCache.Clear(OrganizationalUserContextCacheKeyFactory.Create(domainEvent.UserId));
 }