Imported Upstream version 5.4.0.167

Former-commit-id: 5624ac747d633e885131e8349322922b6a59baaa
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-08-21 15:34:15 +00:00
parent e49d6f06c0
commit 536cd135cc
12856 changed files with 563812 additions and 223249 deletions

View File

@ -211,7 +211,7 @@ namespace System.Web.Configuration {
private void CacheBrowserCapResult(ref HttpCapabilitiesBase result) {
// Use the previously cached browserCap object if an identical
// browserCap is found.
CacheInternal cacheInternal = System.Web.HttpRuntime.CacheInternal;
CacheStoreProvider cacheInternal = System.Web.HttpRuntime.Cache.InternalCache;
if (result.Capabilities == null) {
return;
@ -241,7 +241,7 @@ namespace System.Web.Configuration {
}
else {
// cache it and respect cachetime
cacheInternal.UtcInsert(hashKey, result, null, Cache.NoAbsoluteExpiration, _cachetime);
cacheInternal.Insert(hashKey, result, new CacheInsertOptions() { SlidingExpiration = _cachetime });
}
}
@ -255,7 +255,7 @@ namespace System.Web.Configuration {
internal HttpCapabilitiesBase Evaluate(HttpRequest request) {
HttpCapabilitiesBase result;
CacheInternal cacheInternal = System.Web.HttpRuntime.CacheInternal;
CacheStoreProvider cacheInternal = System.Web.HttpRuntime.Cache.InternalCache;
//
// 1) grab UA and do optimistic cache lookup (if UA is in dependency list)
@ -298,7 +298,7 @@ namespace System.Web.Configuration {
CacheBrowserCapResult(ref result);
// Cache the result using the optimisicCacheKey
cacheInternal.UtcInsert(optimisticCacheKey, result, null, Cache.NoAbsoluteExpiration, _cachetime);
cacheInternal.Insert(optimisticCacheKey, result, new CacheInsertOptions() { SlidingExpiration = _cachetime });
return result;
}
@ -363,9 +363,9 @@ namespace System.Web.Configuration {
CacheBrowserCapResult(ref result);
// cache it and respect _cachetime
cacheInternal.UtcInsert(fullCacheKey, result, null, Cache.NoAbsoluteExpiration, _cachetime);
cacheInternal.Insert(fullCacheKey, result, new CacheInsertOptions() { SlidingExpiration = _cachetime });
if(optimisticCacheKey != null) {
cacheInternal.UtcInsert(optimisticCacheKey, _disableOptimisticCachingSingleton, null, Cache.NoAbsoluteExpiration, _cachetime);
cacheInternal.Insert(optimisticCacheKey, _disableOptimisticCachingSingleton, new CacheInsertOptions() { SlidingExpiration = _cachetime });
}
return result;