Skip to content

Output caching middleware #41037

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 52 commits into from
Jun 22, 2022
Merged

Output caching middleware #41037

merged 52 commits into from
Jun 22, 2022

Conversation

sebastienros
Copy link
Member

The goal of this PR is to gather comments on the APIs or feature gaps while I start working on unit tests in case there would be some significant changes.

This PR doesn't contain a custom store like disk or redis, this will be added as a separate one after this is merged.

Most of the low-level code is taken from response caching. I expect comments that could also apply to response caching, but we might decide to still do the changes only here.

Closes #40228 #40227 #40226 #40224 #40223 #40222 #40221

@sebastienros sebastienros force-pushed the sebros/outputcaching branch from 2897106 to 719df0e Compare April 4, 2022 23:09
@sebastienros sebastienros added the api-ready-for-review API is ready for formal API review - https://github.com/dotnet/apireviews label May 14, 2022
@ghost
Copy link

ghost commented May 14, 2022

Thank you for your API proposal. I'm removing the api-ready-for-review label. API Proposals should be submitted for review through Issues based on this template.

@ghost ghost removed the api-ready-for-review API is ready for formal API review - https://github.com/dotnet/apireviews label May 14, 2022
Copy link
Member

@halter73 halter73 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initial API review notes

Copy link
Member

@JamesNK JamesNK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JamesNK
Copy link
Member

JamesNK commented May 17, 2022

Alternatively, you can leave trimming to a follow up PR, just create an issue for it so it doesn't get forgotten.

@sebastienros
Copy link
Member Author

@campersau thanks a lot, replied when I didn't follow your suggestions.

Copy link
Member

@dougbu dougbu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also back out the src/submodules/googletest update

@@ -209,6 +210,7 @@ static TestData()
{ "Microsoft.AspNetCore.Mvc.RazorPages", "7.0.0.0" },
{ "Microsoft.AspNetCore.Mvc.TagHelpers", "7.0.0.0" },
{ "Microsoft.AspNetCore.Mvc.ViewFeatures", "7.0.0.0" },
{ "Microsoft.AspNetCore.OutputCaching", "7.0.0.0" },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's our approval process these days for extending the shared framework❔ Was that process followed here❔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing apart from api review where it was discussed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know whether that's sufficient. @adityamandaleeka

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed w/ Aditya in triage that we want this in the SharedFx

@@ -48,6 +48,7 @@ Microsoft.AspNetCore.Mvc.RouteAttribute</Description>
<Reference Include="Microsoft.AspNetCore.Http" />
<Reference Include="Microsoft.AspNetCore.Http.Extensions" />
<Reference Include="Microsoft.AspNetCore.ResponseCaching.Abstractions" />
<Reference Include="Microsoft.AspNetCore.OutputCaching" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thought we normally only referenced {blah}.Abstractions from Mvc.Core for middlewares. Why doesn't Microsoft.AspNetCore.OutputCaching.Abstractions exist❔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Abstractions were removed (after api review) since it ships in Framework and an abstraction is not on nuget.

@adityamandaleeka
Copy link
Member

I assume the submodule change was unintended?

Copy link
Member

@BrennanConroy BrennanConroy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make sure all API changes are correct and any modifications are put in the issue for proper API review for the next meeting.

/// <summary>
/// Represents vary-by rules.
/// </summary>
public sealed class CachedVaryByRules
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few differences from the API seen in API review. For example, this class was renamed to CacheVaryByRules and three of the properties were { get; init; }

@wtgodbe
Copy link
Member

wtgodbe commented Jun 22, 2022

CI was green on this PR: https://dev.azure.com/dnceng/public/_build/results?buildId=1840119&view=logs&j=3f6d4e0f-1b71-56b5-361e-d95b6e6da15a. Just merged an update to un-update the googletest submodule, which won't affect CI. Force-merging this now to get it in for preview6.

@wtgodbe wtgodbe merged commit 47f5d8f into main Jun 22, 2022
@wtgodbe wtgodbe deleted the sebros/outputcaching branch June 22, 2022 23:51
@ghost ghost added this to the 7.0-preview6 milestone Jun 22, 2022
@adityamandaleeka adityamandaleeka added the blog-candidate Consider mentioning this in the release blog post label Jul 6, 2022
@ghost
Copy link

ghost commented Jul 6, 2022

@sebastienros, this change will be considered for inclusion in the blog post for the release it'll ship in. Nice work!

Please ensure that the original comment in this thread contains a clear explanation of what the change does, why it's important (what problem does it solve?), and, if relevant, include things like code samples and/or performance numbers.

This content may not be exactly what goes into the blog post, but it will help the team putting together the announcement.

Thanks!

@ghost
Copy link

ghost commented Sep 24, 2022

Hi @jerhon. It looks like you just commented on a closed PR. The team will most probably miss it. If you'd like to bring something important up to their attention, consider filing a new issue and add enough details to build context.

@amcasey amcasey added area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlewares and removed area-runtime labels Jun 6, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlewares blog-candidate Consider mentioning this in the release blog post
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Output-caching entries can be purged programmatically