Skip to content

Making "pubinternal" types in ResponseCaching internal #14898

Closed
@pranavkm

Description

@pranavkm

Making "pubinternal" types in ResponseCaching internal

In ASP.NET Core, pubinternal types are types that are declared as public but put in an .Internal namespace. While these types are public they have no support policy and are subject to breaking changes. Unfortunately accidental use of these types has been common, resulting in breaking changes to these projects and limiting our ability to maintain the framework.

In ASP.NET Core 3.0, we are moving pubinternal types in ResponseCaching to be internal.

In addition, a default implementation for IResponseCachingPolicyProvider and IResponseCachingKeyProvider will no longer be added to services as part of AddResponseCaching method.

Version introduced

3.0

Old behavior

These types were publicly visible, but unsupported

New behavior

These types are now internal.

Reason for change

They better reflect the unsupported policy.

Recommended action

We recommend copying types that are used by your application or library.

Category

ASP.NET Core

Affected APIs

Microsoft.AspNetCore.ResponseCaching.Internal.CachedResponse
Microsoft.AspNetCore.ResponseCaching.Internal.CachedVaryByRules
Microsoft.AspNetCore.ResponseCaching.Internal.IResponseCache
Microsoft.AspNetCore.ResponseCaching.Internal.IResponseCacheEntry
Microsoft.AspNetCore.ResponseCaching.Internal.IResponseCachingKeyProvider
Microsoft.AspNetCore.ResponseCaching.Internal.IResponseCachingPolicyProvider
Microsoft.AspNetCore.ResponseCaching.Internal.MemoryResponseCache
Microsoft.AspNetCore.ResponseCaching.Internal.ResponseCachingContext
Microsoft.AspNetCore.ResponseCaching.Internal.ResponseCachingKeyProvider
Microsoft.AspNetCore.ResponseCaching.Internal.ResponseCachingPolicyProvider
https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.responsecaching.responsecachingmiddleware.-ctor?view=aspnetcore-2.2


Issue metadata

  • Issue type: breaking-change

Metadata

Metadata

Assignees

Labels

breaking-changeIndicates a .NET Core breaking change

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions