Closed rubyconvict closed 10 years ago
This seems like a good idea. I wonder if this would have issues in any environments, so as you mentioned, it would be good as an option but maybe not as as default.
I would accept PR adding this as a non-default option.
I also don't think symlimks is a good idea and would bring a big performance boost. One really should use the file exclude option, so only the assets, that need to have non digest version, get copied over.
In my case, I'm copying everything so that there's a predictable fallback when an asset with a digest that doesn't exist is requested. While keeping 3 versions back definitely mitigates this issue, I still run into it because my Rails assets and manifests are used (and somewhat cached) by other applications. Therefore, it's even more possible for users to request a file the doesn't exist.
When I see a request for an asset that returns a 404, I have the load balancer redirect the user to the non-digest version and return a relatively short Cache-Control header so the user will stay up to date and their browser won't be completely broken (assuming no super crazy changes were made).
+1
When having hundreds of files this matters in terms of speed and hard disk activity, plus, it would save some disk space.