You are using the Paperclip Gem with a Ruby on Rails model and want to setup a proper HTTP-Cache with fingerprinted files (see “What is Fingerprinting and Why Should I Care?” for some background on fingerprinting assets)?
Let me save you a couple of hours searching with this example config:
Additionally you’ll have to add the attribute
avatar_fingerprint to your model. You can add a migration with this command
That will result in the following migration:
After that you’ll have to
Obviously that only works for any new attachment. You’ll have to migrate existing attachments by hand.