mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 14:09:53 +01:00
make sprockets cache definition development-only
This commit is contained in:
parent
9961796e3b
commit
d5d5c5eb19
1 changed files with 8 additions and 6 deletions
|
@ -1,11 +1,13 @@
|
|||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
Rails.application.config.assets.configure do |env|
|
||||
env.cache = Sprockets::Cache::FileStore.new(
|
||||
ENV.fetch("SPROCKETS_CACHE", "#{env.root}/tmp/cache/assets"),
|
||||
Rails.application.config.assets.cache_limit,
|
||||
env.logger
|
||||
)
|
||||
unless Rails.env.production?
|
||||
Rails.application.config.assets.configure do |env|
|
||||
env.cache = Sprockets::Cache::FileStore.new(
|
||||
ENV.fetch("SPROCKETS_CACHE", "#{env.root}/tmp/cache/assets"),
|
||||
Rails.application.config.assets.cache_limit,
|
||||
env.logger
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
# Version of your assets, change this if you want to expire all your assets.
|
||||
|
|
Loading…
Reference in a new issue