[Breaking change]: Output Caching renames in 7.0 RC2 #492
Labels
7.0.0
Announcement
Breaking change
Documented
The breaking change has been published to the .NET Core docs
Description
From 7.0 RC1 to 7.0 RC2 some APIs have changed to better represent their intent.
dotnet/aspnetcore#43892
Version
.NET 7 RC2
Previous behavior
OutputCachePolicyBuilder.VaryByQuery()
was additive: every call would add more query string keys to vary by.New behavior
OutputCachePolicyBuilder.SetVaryByQuery()
is replacing existing query string keys.Type of breaking change
Reason for change
This change was made to improve the consistency of method names and to remove ambiguity in their behavior.
Recommended action
It is recommended you recompile any projects built with an earlier SDK. If any of these method names were referenced directly, the source should be updated to reflect the new names.
Affected APIs
Microsoft.AspNetCore.OutputCaching.OutputCachePolicyBuilder.OutputCachePolicyBuilder()
Microsoft.AspNetCore.OutputCaching.OutputCachePolicyBuilder.Clear()
Microsoft.AspNetCore.OutputCaching.OutputCachePolicyBuilder.AllowLocking()
toSetLocking()
Microsoft.AspNetCore.OutputCaching.OutputCachePolicyBuilder.VaryByRouteValue()
toSetVaryByRouteValue()
Microsoft.AspNetCore.OutputCaching.OutputCachePolicyBuilder.VaryByQuery()
toSetVaryByQuery()
Microsoft.AspNetCore.OutputCaching.OutputCachePolicyBuilder.VaryByHeader()
toSetVaryByHeader()
Microsoft.AspNetCore.OutputCaching.CacheVaryByRules.VaryByHost
Microsoft.AspNetCore.OutputCaching.OutputCacheOptions.AddPolicy(string name, Action<OutputCachePolicyBuilder> build, bool excludeDefaultPolicy)
Microsoft.AspNetCore.OutputCaching.OutputCacheOptions.AddBasePolicy(Action<OutputCachePolicyBuilder> build, bool excludeDefaultPolicy)
Microsoft.Extensions.DependencyInjection.OutputCacheConventionBuilderExtensions.CacheOutput<TBuilder>(this TBuilder builder, Action<OutputCachePolicyBuilder> policy, bool excludeDefaultPolicy)
The text was updated successfully, but these errors were encountered: