Skip to content

Conversation

@onurkanbakirci
Copy link
Contributor

@onurkanbakirci onurkanbakirci commented Aug 16, 2024

DefaultOutputCachePolicyProvider implemented

Description

#52419 implemented.

I have added the DefaultOutputCachePolicyProvider, implemented the IOutputCachePolicyProvider interface, and written tests for them.

@witskeeper , @halter73

@ghost ghost added the area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlewares label Aug 16, 2024
@dotnet-policy-service dotnet-policy-service bot added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions community-contribution Indicates that the PR has been added by a community member labels Aug 16, 2024
onurkanbakirci and others added 3 commits August 16, 2024 11:56
Typo

Co-authored-by: Martin Costello <martin@martincostello.com>
…der.cs


new keyword removed

Co-authored-by: Martin Costello <martin@martincostello.com>
@dotnet-policy-service dotnet-policy-service bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Aug 23, 2024
@halter73
Copy link
Member

halter73 commented Aug 30, 2024

There are two comments from API review that I think were missed:

  • We don't think the implementation needs to be public.
  • The current middleware should use this interface without accessing the options directly to make replacing the implementation useful.

The idea was that AddOutputCache should add the internal DefaultOutputCachePolicyProvider with DI as an IOutputCachePolicyProvider and then use that in the middleware probably here.

@sebastienros Can you also take a look at this?

…der.cs

Co-authored-by: Stephen Halter <halter73@gmail.com>
@halter73
Copy link
Member

halter73 commented Sep 6, 2024

We still need to update AddOutputCache to add the new DefaultOutputCachePolicyProvider and then remove the DefaultOutputCachePolicyProvider related changes to PublicAPI.Unshipped.txt since it's no longer public.

@mkArtakMSFT mkArtakMSFT removed the area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlewares label Sep 16, 2024
@mkArtakMSFT
Copy link
Contributor

@halter73 is the expectation here that this change should be expanded to address the feedback from the API review?

@halter73
Copy link
Member

halter73 commented Jan 4, 2025

is the expectation here that this change should be expanded to address the feedback from the API review?

Basically. At a minimum, we need to add the new service to the collection in AddOutputCache and also update PublicAPI.Unshipped.txt so that the build passes.

Now that the service implementation type is internal, no one will be able to use it unless AddOutputCache adds it making this whole change pointless. Even if the implementation type remained public, we'd want to add the implementation to the service collection for convenience.

The other thing that came up in API review was how the middleware should use the registered IOutputCachePolicyProvider to look up named policies. Not doing so would be counterintuitive. We'd want to test this behavior as well to ensure no regressions.

  • The current middleware should use this interface without accessing the options directly to make replacing the implementation useful.

The idea was that AddOutputCache should add the internal DefaultOutputCachePolicyProvider with DI as an IOutputCachePolicyProvider and then use that in the middleware probably here.

@onurkanbakirci Are you still interested in following up on this feedback and trying to merge this PR? Do you need any additional help from us to point you in the right direction?

If not, we'll have to close it until you or someone else can make the requested improvements.

@halter73 halter73 added the pr: pending author input For automation. Specifically separate from Needs: Author Feedback label Jan 4, 2025
@halter73 halter73 assigned halter73 and unassigned adityamandaleeka Jan 4, 2025
@dotnet-policy-service
Copy link
Contributor

Hi @onurkanbakirci.
It seems you haven't touched this PR for the last two weeks. To avoid accumulating old PRs, we're marking it as stale. As a result, it will be closed if no further activity occurs within 4 days of this comment. You can learn more about our Issue Management Policies here.

@dotnet-policy-service dotnet-policy-service bot added the stale Indicates a stale issue. These issues will be closed automatically soon. label Jan 14, 2025
@Arnab-Developer
Copy link

@onurkanbakirci Are you still interested in following up on this feedback and trying to merge this PR? Do you need any additional help from us to point you in the right direction?

If not, we'll have to close it until you or someone else can make the requested improvements.

@halter73 can I complete the missing parts of this PR and send a new PR from my fork?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions community-contribution Indicates that the PR has been added by a community member pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun pr: pending author input For automation. Specifically separate from Needs: Author Feedback stale Indicates a stale issue. These issues will be closed automatically soon.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants