Ejemplo n.º 1
0
 public CacheScopeImpl(SparkViewBase view, string identifier, CacheExpires expires)
 {
     _identifier         = identifier;
     _expires            = expires;
     _previousCacheScope = view._currentCacheScope;
     _cacheService       = view.CacheService ?? _nullCacheService;
     _originator         = new CacheOriginator(view.SparkViewContext);
 }
Ejemplo n.º 2
0
 protected bool BeginCachedContent(string site, CacheExpires expires, params object[] key)
 {
     this._currentCacheScope = new CacheScopeImpl(this, CacheUtilities.ToIdentifier(site, key), expires);
     if (this._currentCacheScope.Begin())
     {
         return(true);
     }
     this.EndCachedContent();
     return(false);
 }
Ejemplo n.º 3
0
 public CacheScopeImpl(SparkViewBase view, string identifier, CacheExpires expires)
 {
     _identifier = identifier;
     _expires = expires;
     _previousCacheScope = view._currentCacheScope;
     _cacheService = view.CacheService ?? _nullCacheService;
     _originator = new CacheOriginator(view.SparkViewContext);
 }
Ejemplo n.º 4
0
 protected void EndCachedContent(ICacheSignal signal)
 {
     _currentCacheScope = _currentCacheScope.End(signal);
 }
Ejemplo n.º 5
0
 protected void EndCachedContent()
 {
     _currentCacheScope = _currentCacheScope.End(null);
 }
Ejemplo n.º 6
0
        protected bool BeginCachedContent(string site, CacheExpires expires, params object[] key)
        {
            _currentCacheScope = new CacheScopeImpl(this, CacheUtilities.ToIdentifier(site, key), expires);
            if (_currentCacheScope.Begin())
                return true;

            EndCachedContent();
            return false;
        }
Ejemplo n.º 7
0
 protected void EndCachedContent(ICacheSignal signal)
 {
     this._currentCacheScope = this._currentCacheScope.End(signal);
 }
Ejemplo n.º 8
0
 protected void EndCachedContent()
 {
     this._currentCacheScope = this._currentCacheScope.End(null);
 }