Skip to content
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

Option to use input file checksum as cache buster #32

Closed
wants to merge 1 commit into from
Closed

Option to use input file checksum as cache buster #32

wants to merge 1 commit into from

Conversation

rferri
Copy link

@rferri rferri commented Mar 31, 2014

Added option to use an MD5 checksum of the input file content as the cache buster hash. The timestamp will be used by default if the cacheBuster option is not specified as 'checksum'.

Addresses #5

@davidwindell
Copy link

Was just looking for this feature as we already use md5 for our cache busting (albeit in the filename...main.md5.css) before needing bless. 👍

Ping @minlare

@aabenoja
Copy link
Member

This probably won't be merged in with @paulyoung focusing on the v4 release.

@aabenoja
Copy link
Member

@davidwindell As of the current v4 branch (without any changes that @paulyoung may have sitting privately) does not have cachebusting there is no cachebusting support.

@davidwindell
Copy link

Why not? That would make bless unusable for us.

@rferri
Copy link
Author

rferri commented Nov 11, 2014

@davidwindell If you include an md5 in the original file name already you should be safe to disable the cachebusting feature when running bless.

@aabenoja
Copy link
Member

@davidwindell See #30. tldr; Because a v4 beta is coming soon that does everything more efficiently.

@paulyoung
Copy link
Contributor

I was thinking about deprecating the cache buster feature in v4 since I'm sure there are more robust, dedicated tools for that which can be used in conjunction with bless.

@aabenoja
Copy link
Member

I can't remember where you said this, but wasn't one of the goals of v4 to streamline bless so we can pipe the output to other packages? Such as a more efficient cache buster?

EDIT I guess a better way to say this is "make bless a better streaming process"

@paulyoung
Copy link
Contributor

The goal of bless has always been to split a CSS file into the optimal size based on the number of selectors.

Cache buster was something that got added for convenience along the way but it distracts from the purpose of the tool and couples bless to a different problem.

@aabenoja
Copy link
Member

I originally meant the changes to v4 specifically, not the goal of the project, though I do agree about keeping the scope of the package small and leave the cache busting to specialized packages.

@davidwindell
Copy link

So it seems you are saying we will have to run a script to edit the css file's @import statement just to add cachebusting onto the file's path every time we run bless. That will be a massive pain!

@paulyoung
Copy link
Contributor

@davidwindell - as @rurjur mentioned above:

If you include an md5 in the original file name already you should be safe to disable the cachebusting feature when running bless.

@davidwindell
Copy link

We use rewrite rules so we don't have to change the file name, that leaves the import unbusted

@yanyu0517
Copy link

Have you published stable v4 to npm ?

@paulyoung
Copy link
Contributor

@yanyu0517 – I just created #89 to track this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants