Reputation: 2012
I have a Rails 4 app running on the Ceder Stack of Heroku. I use conditional responses based on etag. I have an initialization script which changes the etag value so that each new release requires browser to renew cache:
# creates new seed for creation of etag in header
ENV["RAILS_CACHE_ID"] = Time.now.to_s
This works fine in staging, but in production I am using multiple dynos and they can end up with different values.
Is there a variable I can use that will be unique for each release but identical across all dynos? The git version number perhaps? Thanks in advance for any insights.
Upvotes: 0
Views: 30