Exemplo n.º 1
0
        private void Insert(string key, object query, object result, CacheItemPolicy cachePolicy)
        {
            CacheEventSource.Log.CacheInsert(key, CacheRegionName);

            // select the cache entry monitors and add their keys to the cache

            Cache.Insert(key, result, cachePolicy, CacheRegionName);

            var cached = query as CachedOrganizationRequest;

            if (cached != null && cached.Telemetry != null)
            {
                Cache.AddCacheItemTelemetry(key, cached.Telemetry, CacheRegionName);
            }
        }