Just take this source from sprockets' server.rb:
if attributes_for(env["PATH_INFO"]).path_fingerprint
headers["Cache-Control"] << ", max-age=31536000"
# Otherwise set `must-revalidate` since the asset could be modified.
else
headers["Cache-Control"] << ", must-revalidate"
end