Ruby on Rails Guides: Asset Pipeline
Not all caches will reliably cache content where the filename only differs by query parameters . Steve Souders recommends , “…avoiding a querystring for cacheable resources”. He found that in this case 5-20% of requests will not be cached. Query strings in particular do not work at all with some CDNs for cache invalidation. The file name can change between nodes in multi-server environments. The default query string in Rails 2.x is based on the modification time of the files. When assets are deployed to a cluster, there is no guarantee that the timestamps will be the same, resulting in different values being used depending on which server handles the request. Too much cache invalidation When static assets are deployed with each new release of code, the mtime of all these files changes, forcing all remote clients to fetch them again, even when the content of those assets ha...