When i deploy a rails application in production mode, it appends a date-time string as a query param to the end of all the static asset urls. This is to prevent browsers using o
@Aupajo I like this, but I think I can take it a bit further. The problem here is that capistrano does create new copies of all the files on every deploy, so all the cache-busting strings are changed. However an MD5 of the file would only change when the file content changes.
Of course, generating an MD5 is expensive and slow, but you can cache the MD5 of a file in memcache, (keyed on the change time, as if the time has changed the MD5 may have changed, but if the timestamp has not changed the MD5 will not have changed