File tree 4 files changed +5
-5
lines changed
4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
- // Licensed to the .NET Foundation under one or more agreements.
1
+ // Licensed to the .NET Foundation under one or more agreements.
2
2
// The .NET Foundation licenses this file to you under the MIT license.
3
3
4
4
using Microsoft . Extensions . Caching . Memory ;
@@ -20,7 +20,8 @@ public CacheTagHelperMemoryCacheFactory(IOptions<CacheTagHelperOptions> options)
20
20
{
21
21
Cache = new MemoryCache ( new MemoryCacheOptions
22
22
{
23
- SizeLimit = options . Value . SizeLimit
23
+ SizeLimit = options . Value . SizeLimit ,
24
+ TrackLinkedCacheEntries = true ,
24
25
} ) ;
25
26
}
26
27
Original file line number Diff line number Diff line change @@ -84,6 +84,7 @@ internal static void AddCacheTagHelperServices(IServiceCollection services)
84
84
85
85
// Required default services for cache tag helpers
86
86
services . AddDistributedMemoryCache ( ) ;
87
+ services . AddMemoryCache ( options => options . TrackLinkedCacheEntries = true ) ;
87
88
services . TryAddSingleton < CacheTagHelperMemoryCacheFactory > ( ) ;
88
89
}
89
90
}
Original file line number Diff line number Diff line change @@ -485,15 +485,14 @@ public async Task ProcessAsync_UsesExpiresSliding_ToExpireCacheEntryWithSlidingE
485
485
}
486
486
487
487
[ Fact ]
488
- [ QuarantinedTest ( "https://github.com/dotnet/aspnetcore/issues/36765" ) ]
489
488
public async Task ProcessAsync_FlowsEntryLinkThatAllowsAddingTriggersToAddedEntry ( )
490
489
{
491
490
// Arrange
492
491
var id = "some-id" ;
493
492
var expectedContent = new DefaultTagHelperContent ( ) ;
494
493
expectedContent . SetContent ( "some-content" ) ;
495
494
var tokenSource = new CancellationTokenSource ( ) ;
496
- var cache = new MemoryCache ( new MemoryCacheOptions ( ) ) ;
495
+ var cache = new MemoryCache ( new MemoryCacheOptions ( ) { TrackLinkedCacheEntries = true } ) ;
497
496
var cacheEntryOptions = new MemoryCacheEntryOptions ( )
498
497
. AddExpirationToken ( new CancellationChangeToken ( tokenSource . Token ) ) ;
499
498
var tagHelperContext = new TagHelperContext (
Original file line number Diff line number Diff line change @@ -526,7 +526,6 @@ public async Task CacheTagHelper_VariesByUserId()
526
526
}
527
527
528
528
[ Fact ]
529
- [ QuarantinedTest ( "https://github.com/dotnet/aspnetcore/issues/36765" ) ]
530
529
public async Task CacheTagHelper_BubblesExpirationOfNestedTagHelpers ( )
531
530
{
532
531
// Arrange & Act - 1
You can’t perform that action at this time.
0 commit comments