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

initial work adding asset version back so cache busts #1

Open
wants to merge 6 commits into
base: 3.x
Choose a base branch
from

Conversation

kilgore5
Copy link

@kilgore5 kilgore5 commented Feb 1, 2016

Conclusion: Monkey Patch

jbravata added a commit to jbravata/sprockets that referenced this pull request Aug 11, 2016
jacobbednarz added a commit to jacobbednarz/sprockets that referenced this pull request May 16, 2017
Updates the file digest to take into account the configured version
which allows tasks like invalidating all assets possible again.

Backports rails#404 to 3.x using patch from sellect#1
jacobbednarz added a commit to jacobbednarz/sprockets that referenced this pull request May 16, 2017
Updates the file digest to take into account the configured version
which allows tasks like invalidating all assets possible again.

Backports rails#404 to 3.x using patch from sellect#1
@jacobbednarz
Copy link

@kilgore5 just looking to confirm, does this work for your coffescript/js assets too? i'm not seeing this working on our javascript files and can't see why 😕

@jacobbednarz
Copy link

i do see there are very different processor files for coffeescript and sass (primarily the use of @version in the cache_key method

@kilgore5
Copy link
Author

kilgore5 commented May 31, 2017

@jacobbednarz since we ended up using a monkey-patch (basically the same code) I haven't used this specific patch code in a long time.

But I can confirm that the monkey patch is working correctly for us for js assets (bumping the assets version busts the cache for all files, making changes to one coffeescript file busts the cache for the file it's compiled into and forces re-compilation of that file, etc). Is there an edge case I'm missing?

@jacobbednarz
Copy link

jacobbednarz commented May 31, 2017

@kilgore5 I'm really not sure at this point. It could very well be the way we're running it in our codebase but I can't be certain since I also can't pinpoint exactly what part of this isn't working to update the filename hash.

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.

2 participants