public CacheScopeImpl(SparkViewBase view, string identifier, CacheExpires expires) { _identifier = identifier; _expires = expires; _previousCacheScope = view._currentCacheScope; _cacheService = view.CacheService ?? _nullCacheService; _originator = new CacheOriginator(view.SparkViewContext); }
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); }
protected void EndCachedContent(ICacheSignal signal) { _currentCacheScope = _currentCacheScope.End(signal); }
protected void EndCachedContent() { _currentCacheScope = _currentCacheScope.End(null); }
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; }
protected void EndCachedContent(ICacheSignal signal) { this._currentCacheScope = this._currentCacheScope.End(signal); }
protected void EndCachedContent() { this._currentCacheScope = this._currentCacheScope.End(null); }