Ejemplo n.º 1
0
        /// <summary>
        /// Marks this shape to be cached
        /// </summary>
        public CacheContext Cache(string cacheId)
        {
            if(_cacheContext == null || _cacheContext.CacheId != cacheId)
            {
                _cacheContext = new CacheContext(cacheId);
            }

            return _cacheContext;
        }
 private IEnumerable<CacheContextEntry> GetCacheEntries(CacheContext cacheContext)
 {
     // All contexts' entries
     foreach(var entry in GetCacheEntries(cacheContext.Contexts))
     {
         yield return entry;
     }
 }