I have a small application that serves documents (typically PDF and
word). I’m using the file_column plug-in to update and manage the
documents. I’m serving the documents via Mongrel (this is a small
intranet application).
I have one main problem: users’ browsers are caching the documents, and
therefore new revisions of documents are not being downloaded by
everyone. I want to send an HTTP header Cache-Control statement limiting
the life of the documents to tens of minutes. Can I do this within my
Rails application?
If not, I’ll serve the documents via another server where I can set the
cache life at the folder level. However, it would be easier to manage
the system if the setting could be made within the Rails app.