-
-
Notifications
You must be signed in to change notification settings - Fork 31k
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
Refs #31949 -- Made @never_cache and @cache_control() decorators to work with async functions. #16436
Refs #31949 -- Made @never_cache and @cache_control() decorators to work with async functions. #16436
Conversation
d1dc285
to
b05df56
Compare
3095e0d
to
f247582
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @LomaxOnTheRun.
Thanks for the updates here.
Apart from the @sync_and_async_middleware
topic, I like this now.
I'm going to need to ask @felixxm to carry it over the line. (I'll still be around but I'm stepping down as Fellow.)
- Can you squash and rebase on latest
main
? - The moved tests: can that be done in a separate first commit, so it's easy to see and verify?
- Docs changes/release notes needed.
I'm going to check the patch needs improvement and needs documentation flags on the ticket. (Or make sure they're checked.) Once you've addressed the bullets, can you make sure to uncheck those flags, so the ticket will appear again on the review queue?
Thanks again! Good hustle! 🏅
601d832
to
5bc9c9f
Compare
@carltongibson thank you for the review, and for all of the reviews and help you've given all the way to this point. I genuinely appreciate your time and effort 😊 @felixxm hiya 👋 I've updated the PR so that:
It's worth noting that this commit has also been a large change. It alters I would suggest that it's worth splitting out the |
Hello @LomaxOnTheRun , Carlton mentioned this issue to me and I think this is a really cool feature and would love an opportunity to contribute to it. I am still studying your progress and I see you have You've made great progress with this issue and it's lovely to see. Awesome 🤩 |
5bc9c9f
to
f5c2122
Compare
Hiya @Th3nn3ss 👋 I'm very happy to share out the decorators, though it would probably be useful for me to give a summary of the journey so far:
Practically, this means that I would recommend waiting until this PR is approved before diving in with other decorators, to avoid having multiple PRs being reviewed / changed for the same things. Obviously this is ultimately at @felixxm's discretion. Once you do pick up another set of decorators, the I've slimmed this PR down to just the |
f5c2122
to
c5928df
Compare
I've updated the docs to say this change is for version 5.0 (which I believe is the next planned version), not 4.2. |
c5928df
to
3478c33
Compare
cache
view decoratorsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LomaxOnTheRun Thanks for all your efforts 👍 I squashed and reorganized commits, and pushed final edits.
ce4cfca
to
6e443f8
Compare
6e443f8
to
573e2b7
Compare
Thanks both 🎁. I didn't check everything in depth but this looks roughly how I was hoping/would expect, so 👍 |
@LomaxOnTheRun Do you want to take a look at edits? |
…ork with async functions. Thanks Carlton Gibson and Mariusz Felisiak for reviews.
573e2b7
to
4dfc6ff
Compare
@felixxm @carltongibson apologies for my radio silence recently, I've been absolutely slammed over the last week or so. More importantly, a huge thank you to you both for pushing this over the line 😄 Now we've established an acceptable pattern, I'll push up another few PRs to cover the other decorators. I think the function based ones should be relatively easy to go through now, it's primarily the |
Reference to #31949.
This PR makes the
cache_control
andnever_cache
view decorators able to handle both sync and async views.