Exemple #1
0
        /// <summary>
        /// Save an URI in the cache.
        /// </summary>
        private void SetCache(Uri requestUri, string requestResult)
        {
            HttpQueryCacheEntry cacheEntry = new HttpQueryCacheEntry();

            cacheEntry.Uri    = requestUri;
            cacheEntry.Result = requestResult;
            // XXX: Is this too much or not enough time?
            cacheEntry.DeathTime = DateTime.Now.AddMinutes(15.0);

            lock (CacheSync)
            {
                queryCache[requestUri] = cacheEntry;
            }
        }
Exemple #2
0
        /// <summary>
        /// Save an URI in the cache.
        /// </summary>
        private void SetCache(Uri requestUri, string requestResult)
        {
            HttpQueryCacheEntry cacheEntry = new HttpQueryCacheEntry();

            cacheEntry.Uri = requestUri;
            cacheEntry.Result = requestResult;
            // XXX: Is this too much or not enough time?
            cacheEntry.DeathTime = DateTime.Now.AddMinutes(15.0);

            lock (CacheSync)
            {
                queryCache[requestUri] = cacheEntry;
            }
        }