-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Set Smidge cachebuster type #18198
Set Smidge cachebuster type #18198
Conversation
Hi there @SimonHartfield, thank you for this contribution! 👍 While we wait for one of the Core Collaborators team to have a look at your work, we wanted to let you know about that we have a checklist for some of the things we will consider during review:
Don't worry if you got something wrong. We like to think of a pull request as the start of a conversation, we're happy to provide guidance on improving your contribution. If you realize that you might want to make some changes then you can do that by adding new commits to the branch you created for this work and pushing new commits. They should then automatically show up as updates to this pull request. Thanks, from your friendly Umbraco GitHub bot 🤖 🙂 |
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.
Thanks for this @SimonHartfield. I've had a read through the linked issue and agree it makes sense here we align the settings for the cache buster for front-end rendering of bundled assets. And testing locally confirms that this will now use the expected configurated value.
Just to document, to test I've added a custom bundle as per the documentation and rendered it on the front-end with:
@{
@inject IRuntimeMinifier RuntimeMinifier
}
@Html.Raw(await RuntimeMinifier.RenderCssHereAsync("registered-css-bundle"))
Then I've amended the Umbraco:CMS:RuntimeMinification:CacheBuster
setting to confirm that the expected cachebuster querystring is rendered.
Just a couple of minor updates I've suggested before merging - if you'd like to update, or I can if you prefer to let me know.
src/Umbraco.Web.Common/RuntimeMinification/SmidgeOptionsSetup.cs
Outdated
Show resolved
Hide resolved
src/Umbraco.Web.Common/RuntimeMinification/SmidgeOptionsSetup.cs
Outdated
Show resolved
Hide resolved
Hi @AndyButland I've added those amends inline with your comments, if you were looking for something different then I'll take you up on your offer and you can make further amends. Cheers, |
Looks great @SimonHartfield thanks. I just tweaked the exception message a little but all looks good to me. I'll merge this in once the build pipeline is happy. |
Prerequisites
This fixes : 15165
Description
Sets the cachebuster type for Smidge correctly, so that the version is correctly set on the URL
Testing
Replication steps for the bug from HQ are here:
#15165 (comment)
Set the smidge cache buster to AppDomain
Confirm that the version in the URLs is no longer 1