@@ -294,7 +294,7 @@ public bool IsAcceptableEncoding(string contentEncoding, string acceptEncoding)
294294 }
295295 double weight = GetAcceptableEncodingHelper ( contentEncoding , acceptEncoding ) ;
296296 return ! ( weight == 0 ) &&
297- ( ! ( weight <= 0 ) || GetAcceptableEncodingHelper ( Asterisk , acceptEncoding ) = = 0 ) ;
297+ ( ! ( weight <= 0 ) || GetAcceptableEncodingHelper ( Asterisk , acceptEncoding ) ! = 0 ) ;
298298 }
299299
300300 public bool IsResponseCacheable ( ) {
@@ -509,7 +509,7 @@ private bool HasDependencyChanged(string depKey, string[] fileDeps, string kerne
509509 DependencyCacheTimeSpan = Cache . NoSlidingExpiration ,
510510 DependencyRemovedCallback = null
511511 } ;
512- memoryCache . Add ( depKey , dcew , DateTimeOffset . MaxValue ) ;
512+ memoryCache . Set ( depKey , dcew , DateTimeOffset . MaxValue ) ;
513513 return false ;
514514 }
515515 // file dependencies have changed
@@ -596,24 +596,22 @@ private async Task InsertResponseAsync(string cachedVaryKey,
596596 string depKey = OutputcacheKeyprefixDependencies + dependencies . GetUniqueID ( ) ;
597597 OutputCacheEntry oce = Convert ( rawResponse , depKey , dependencies . GetFileDependencies ( ) ) ;
598598 await provider . SetAsync ( rawResponseKey , oce , absExp ) ;
599- {
600- // use Add and dispose dependencies if there's already one in the cache
601- var dce = new DependencyCacheEntry {
602- RawResponseKey = rawResponseKey ,
603- KernelCacheUrl = oce . KernelCacheUrl ,
604- Name = provider . Name
605- } ;
606- var dcew = new DependencyCacheEntryWrapper {
607- DependencyCacheEntry = dce ,
608- Dependencies = dependencies ,
609- CacheItemPriority = System . Web . Caching . CacheItemPriority . Normal ,
610- DependencyCacheTimeSpan = Cache . NoSlidingExpiration ,
611- DependencyRemovedCallback = null
612- } ;
613- object d = await provider . AddAsync ( depKey , dcew , absExp ) ;
614- if ( d != null ) {
615- dependencies . Dispose ( ) ;
616- }
599+ // use Add and dispose dependencies if there's already one in the cache
600+ var dce = new DependencyCacheEntry {
601+ RawResponseKey = rawResponseKey ,
602+ KernelCacheUrl = oce . KernelCacheUrl ,
603+ Name = provider . Name
604+ } ;
605+ var dcew = new DependencyCacheEntryWrapper {
606+ DependencyCacheEntry = dce ,
607+ Dependencies = dependencies ,
608+ CacheItemPriority = System . Web . Caching . CacheItemPriority . Normal ,
609+ DependencyCacheTimeSpan = Cache . NoSlidingExpiration ,
610+ DependencyRemovedCallback = null
611+ } ;
612+ object d = await provider . AddAsync ( depKey , dcew , absExp ) ;
613+ if ( d != null ) {
614+ dependencies . Dispose ( ) ;
617615 }
618616 }
619617 }
0 commit comments