docbrown/config/initializers/fastly.rb
rhymes d76c914f68 Set default Fastly Rails caching back to 30 days (#4996)
* Set default Fastly Rails caching back to 30 days

* Update reactions spec to use Fastly values instead of harcoded ones
2019-12-03 11:29:25 -05:00

7 lines
423 B
Ruby

FastlyRails.configure do |c|
c.api_key = ApplicationConfig["FASTLY_API_KEY"] # Fastly api key, required
c.max_age = 30.days.to_i # time in seconds, optional, defaults to 2592000 (30 days)
c.service_id = ApplicationConfig["FASTLY_SERVICE_ID"] # Fastly service you will be using, required
c.stale_if_error = 26_400
c.purging_enabled = Rails.env.production? # No need to configure a client locally (since 0.4.0)
end