10 writes to CacheKeyPrefix
Microsoft.AspNetCore.OutputCaching (1)
Policies\SetCacheKeyPrefixPolicy.cs (1)
20
_varyByAsync = async (context, rules, cancellationToken) => rules.
CacheKeyPrefix
= await varyBy(context, cancellationToken);
Microsoft.AspNetCore.OutputCaching.Tests (9)
OutputCacheKeyProviderTests.cs (9)
89
context.CacheVaryByRules.
CacheKeyPrefix
= Guid.NewGuid().ToString("n");
184
context.CacheVaryByRules.
CacheKeyPrefix
= Guid.NewGuid().ToString("n");
197
context.CacheVaryByRules.
CacheKeyPrefix
= Guid.NewGuid().ToString("n");
210
context.CacheVaryByRules.
CacheKeyPrefix
= Guid.NewGuid().ToString("n");
223
context.CacheVaryByRules.
CacheKeyPrefix
= Guid.NewGuid().ToString("n");
238
context.CacheVaryByRules.
CacheKeyPrefix
= Guid.NewGuid().ToString("n");
253
context.CacheVaryByRules.
CacheKeyPrefix
= Guid.NewGuid().ToString("n");
272
context.CacheVaryByRules.
CacheKeyPrefix
= Guid.NewGuid().ToString("n");
420
context.CacheVaryByRules.
CacheKeyPrefix
= Guid.NewGuid().ToString("n");
13 references to CacheKeyPrefix
Microsoft.AspNetCore.OutputCaching.Tests (13)
OutputCacheKeyProviderTests.cs (9)
91
Assert.Equal($"{context.CacheVaryByRules.
CacheKeyPrefix
}{KeyDelimiter}{EmptyBaseKey}", cacheKeyProvider.CreateStorageKey(context));
187
Assert.Equal($"{context.CacheVaryByRules.
CacheKeyPrefix
}{KeyDelimiter}{EmptyBaseKey}{KeyDelimiter}Q{KeyDelimiter}QueryA=ValueA{KeyDelimiter}QueryC=",
200
Assert.Equal($"{context.CacheVaryByRules.
CacheKeyPrefix
}{KeyDelimiter}{EmptyBaseKey}{KeyDelimiter}Q{KeyDelimiter}QueryA=ValueA{KeyDelimiter}QueryC=",
213
Assert.Equal($"{context.CacheVaryByRules.
CacheKeyPrefix
}{KeyDelimiter}{EmptyBaseKey}{KeyDelimiter}Q{KeyDelimiter}QUERYA=ValueA",
228
Assert.Equal($"{context.CacheVaryByRules.
CacheKeyPrefix
}{KeyDelimiter}{EmptyBaseKey}{KeyDelimiter}Q{KeyDelimiter}QUERYA=ValueA{KeyDelimiter}QUERYB=ValueB",
243
Assert.Equal($"{context.CacheVaryByRules.
CacheKeyPrefix
}{KeyDelimiter}{EmptyBaseKey}{KeyDelimiter}Q{KeyDelimiter}QUERYA=ValueA{KeySubDelimiter}ValueB",
258
Assert.Equal($"{context.CacheVaryByRules.
CacheKeyPrefix
}{KeyDelimiter}{EmptyBaseKey}{KeyDelimiter}Q{KeyDelimiter}QUERYA=ValueA{KeySubDelimiter}ValueB",
277
Assert.Equal($"{context.CacheVaryByRules.
CacheKeyPrefix
}{KeyDelimiter}{EmptyBaseKey}{KeyDelimiter}H{KeyDelimiter}HeaderA=ValueA{KeyDelimiter}HeaderC={KeyDelimiter}Q{KeyDelimiter}QueryA=ValueA{KeyDelimiter}QueryC={KeyDelimiter}R{KeyDelimiter}RouteA=ValueA{KeyDelimiter}RouteC=",
423
Assert.Equal($"{context.CacheVaryByRules.
CacheKeyPrefix
}{KeyDelimiter}{EmptyBaseKey}{KeyDelimiter}R{KeyDelimiter}ROUTEA=ValueA",
OutputCachePoliciesTests.cs (1)
281
Assert.Equal(value, context.CacheVaryByRules.
CacheKeyPrefix
);
OutputCachePolicyBuilderTests.cs (3)
211
Assert.Equal("tenant1", context1.CacheVaryByRules.
CacheKeyPrefix
);
212
Assert.Equal("tenant2", context2.CacheVaryByRules.
CacheKeyPrefix
);
213
Assert.Equal("tenant3", context3.CacheVaryByRules.
CacheKeyPrefix
);