5 instantiations of OutputCachePolicyBuilder
Microsoft.AspNetCore.OutputCaching (5)
OutputCacheAttribute.cs (2)
79
builder = new
OutputCachePolicyBuilder
(excludeDefaultPolicy: true);
84
builder =
new
();
OutputCacheOptions.cs (2)
75
var builder = new
OutputCachePolicyBuilder
(excludeDefaultPolicy);
105
var builder = new
OutputCachePolicyBuilder
(excludeDefaultPolicy);
Policies\OutputCacheConventionBuilderExtensions.cs (1)
65
var outputCachePolicyBuilder = new
OutputCachePolicyBuilder
(excludeDefaultPolicy);
59 references to OutputCachePolicyBuilder
Microsoft.AspNetCore.OutputCaching (39)
OutputCacheAttribute.cs (1)
74
OutputCachePolicyBuilder
builder;
OutputCacheOptions.cs (10)
63
/// <param name="build">An action on <see cref="
OutputCachePolicyBuilder
"/>.</param>
65
public void AddPolicy(string name, Action<
OutputCachePolicyBuilder
> build) => AddPolicy(name, build, false);
71
/// <param name="build">An action on <see cref="
OutputCachePolicyBuilder
"/>.</param>
73
public void AddPolicy(string name, Action<
OutputCachePolicyBuilder
> build, bool excludeDefaultPolicy)
75
var
builder = new OutputCachePolicyBuilder(excludeDefaultPolicy);
94
/// <param name="build">An action on <see cref="
OutputCachePolicyBuilder
"/>.</param>
96
public void AddBasePolicy(Action<
OutputCachePolicyBuilder
> build) => AddBasePolicy(build, false);
101
/// <param name="build">An action on <see cref="
OutputCachePolicyBuilder
"/>.</param>
103
public void AddBasePolicy(Action<
OutputCachePolicyBuilder
> build, bool excludeDefaultPolicy)
105
var
builder = new OutputCachePolicyBuilder(excludeDefaultPolicy);
OutputCachePolicyBuilder.cs (23)
35
internal
OutputCachePolicyBuilder
AddPolicy(IOutputCachePolicy policy)
46
public
OutputCachePolicyBuilder
AddPolicy([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type policyType)
55
public
OutputCachePolicyBuilder
AddPolicy<[DynamicallyAccessedMembers(ActivatorAccessibility)] T>() where T : IOutputCachePolicy
64
public
OutputCachePolicyBuilder
With(Func<OutputCacheContext, CancellationToken, ValueTask<bool>> predicate)
78
public
OutputCachePolicyBuilder
With(Func<OutputCacheContext, bool> predicate)
96
public
OutputCachePolicyBuilder
SetVaryByQuery(string queryKey, params string[] queryKeys)
110
public
OutputCachePolicyBuilder
SetVaryByQuery(string[] queryKeys)
122
public
OutputCachePolicyBuilder
SetVaryByHeader(string headerName, params string[] headerNames)
132
public
OutputCachePolicyBuilder
SetVaryByHeader(string[] headerNames)
144
public
OutputCachePolicyBuilder
SetVaryByRouteValue(string routeValueName, params string[] routeValueNames)
155
public
OutputCachePolicyBuilder
SetVaryByRouteValue(string[] routeValueNames)
166
public
OutputCachePolicyBuilder
SetCacheKeyPrefix(string keyPrefix)
182
public
OutputCachePolicyBuilder
SetCacheKeyPrefix(Func<HttpContext, string> keyPrefix)
198
public
OutputCachePolicyBuilder
SetCacheKeyPrefix(Func<HttpContext, CancellationToken, ValueTask<string>> keyPrefix)
210
public
OutputCachePolicyBuilder
VaryByValue(string key, string value)
227
public
OutputCachePolicyBuilder
VaryByValue(Func<HttpContext, KeyValuePair<string, string>> varyBy)
243
public
OutputCachePolicyBuilder
VaryByValue(Func<HttpContext, CancellationToken, ValueTask<KeyValuePair<string, string>>> varyBy)
254
public
OutputCachePolicyBuilder
Tag(params string[] tags)
265
public
OutputCachePolicyBuilder
Expire(TimeSpan expiration)
275
public
OutputCachePolicyBuilder
SetLocking(bool enabled) => AddPolicy(enabled ? LockingPolicy.Enabled : LockingPolicy.Disabled);
283
public
OutputCachePolicyBuilder
NoCache()
292
public
OutputCachePolicyBuilder
Cache()
306
public
OutputCachePolicyBuilder
SetVaryByHost(bool enabled)
Policies\OutputCacheConventionBuilderExtensions.cs (5)
50
/// <param name="policy">An action on <see cref="
OutputCachePolicyBuilder
"/>.</param>
51
public static TBuilder CacheOutput<TBuilder>(this TBuilder builder, Action<
OutputCachePolicyBuilder
> policy)
59
/// <param name="policy">An action on <see cref="
OutputCachePolicyBuilder
"/>.</param>
61
public static TBuilder CacheOutput<TBuilder>(this TBuilder builder, Action<
OutputCachePolicyBuilder
> policy, bool excludeDefaultPolicy) where TBuilder : IEndpointConventionBuilder
65
var
outputCachePolicyBuilder = new OutputCachePolicyBuilder(excludeDefaultPolicy);
Microsoft.AspNetCore.OutputCaching.Tests (20)
OutputCachePolicyBuilderTests.cs (20)
14
var
builder = new OutputCachePolicyBuilder();
23
var
builder = new OutputCachePolicyBuilder(true);
35
var
builder = new OutputCachePolicyBuilder();
48
var
builder = new OutputCachePolicyBuilder();
65
var
builder = new OutputCachePolicyBuilder();
83
var
builder = new OutputCachePolicyBuilder(true);
96
var
builder = new OutputCachePolicyBuilder();
110
var
builder = new OutputCachePolicyBuilder();
126
var
builder = new OutputCachePolicyBuilder();
146
var
builder = new OutputCachePolicyBuilder();
166
var
builder = new OutputCachePolicyBuilder();
186
var
builder = new OutputCachePolicyBuilder();
221
var
builder = new OutputCachePolicyBuilder();
241
var
builder = new OutputCachePolicyBuilder();
255
var
builder = new OutputCachePolicyBuilder();
267
var
builder = new OutputCachePolicyBuilder();
279
var
builder = new OutputCachePolicyBuilder();
291
var
builder = new OutputCachePolicyBuilder(true);
306
var
builder = new OutputCachePolicyBuilder();
318
var
builder = new OutputCachePolicyBuilder();