コード例 #1
0
ファイル: SparkViewBase.cs プロジェクト: yhtsnda/spark
 public CacheScopeImpl(SparkViewBase view, string identifier, CacheExpires expires)
 {
     _identifier         = identifier;
     _expires            = expires;
     _previousCacheScope = view._currentCacheScope;
     _cacheService       = view.CacheService ?? _nullCacheService;
     _originator         = new CacheOriginator(view.SparkViewContext);
 }
コード例 #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);
 }
コード例 #3
0
ファイル: SparkViewBase.cs プロジェクト: Eilon/spark
 public CacheScopeImpl(SparkViewBase view, string identifier, CacheExpires expires)
 {
     _identifier = identifier;
     _expires = expires;
     _previousCacheScope = view._currentCacheScope;
     _cacheService = view.CacheService ?? _nullCacheService;
     _originator = new CacheOriginator(view.SparkViewContext);
 }
コード例 #4
0
ファイル: SparkViewBase.cs プロジェクト: Eilon/spark
 protected void EndCachedContent(ICacheSignal signal)
 {
     _currentCacheScope = _currentCacheScope.End(signal);
 }
コード例 #5
0
ファイル: SparkViewBase.cs プロジェクト: Eilon/spark
 protected void EndCachedContent()
 {
     _currentCacheScope = _currentCacheScope.End(null);
 }
コード例 #6
0
ファイル: SparkViewBase.cs プロジェクト: Eilon/spark
        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;
        }
コード例 #7
0
 protected void EndCachedContent(ICacheSignal signal)
 {
     this._currentCacheScope = this._currentCacheScope.End(signal);
 }
コード例 #8
0
 protected void EndCachedContent()
 {
     this._currentCacheScope = this._currentCacheScope.End(null);
 }