-
Notifications
You must be signed in to change notification settings - Fork 821
Boost: Update minify garbage collection to clean up files as well #44137
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
base: add/boost/minify-cleanup-HOG-189
Are you sure you want to change the base?
Boost: Update minify garbage collection to clean up files as well #44137
Conversation
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! Boost plugin: No scheduled milestone found for this plugin. If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
Code Coverage SummaryNo summary data is available for parent commit 9598f32, so cannot calculate coverage changes. 😴 If that commit is a feature branch rather than a trunk commit, this is expected. Otherwise, this should be updated once coverage for 9598f32 is available. Full summary · PHP report · JS report Coverage check overridden by
I don't care about code coverage for this PR
|
// Since we don't have a way to know if this file is JS or CSS, | ||
// we delete both. | ||
|
||
$js_file_path = jetpack_boost_get_minify_file_path( $hash . '.min.js' ); |
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.
Just confirming here; It's not possible/extremely unlikely that there can be both a $hash
.min.js, and a $hash
.min.css? As if both exist, the CSS file will not be deleted
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.
I hadn't thought of that.
Though the hash is built from the path names of the assets and the modify time of the newest one.
I've updated this in 96338bd.
…ify-cleanup-static-files-HOG-190
Caution
Merge this after #44134
Fixes HOG-190
Proposed changes:
Other information:
Jetpack product discussion
HOG-190
Does this pull request change what data or activity we track or use?
no
Testing instructions:
boost-cache/static
;jetpack/projects/plugins/boost/app/lib/minify/class-cleanup-stored-paths.php
Line 84 in 0d859b4
to
This will force garbage collection to clean up any static files that were created, as it will treat them as expired.