Only do cache cleanup if cache already exists.
This commit is contained in:
parent
5b988d073c
commit
9a9d21470e
2 changed files with 5 additions and 4 deletions
|
@ -62,7 +62,6 @@ module Zammad
|
||||||
# Version of your assets, change this if you want to expire all your assets
|
# Version of your assets, change this if you want to expire all your assets
|
||||||
config.assets.version = '1.0'
|
config.assets.version = '1.0'
|
||||||
|
|
||||||
|
|
||||||
# Use a different cache store in production
|
# Use a different cache store in production
|
||||||
config.cache_store = :file_store, 'tmp/cache/file_store'
|
config.cache_store = :file_store, 'tmp/cache/file_store'
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
# clear cache
|
# clear cache
|
||||||
Rails.cache.clear
|
if Zammad::Application.config.cache_store[1] && File.directory?(Zammad::Application.config.cache_store[1])
|
||||||
|
Rails.cache.clear
|
||||||
|
end
|
||||||
|
|
||||||
# to get rails caching working, load models
|
# to get rails caching working, load models
|
||||||
Dir.foreach("#{Rails.root}/app/models") do |model_name|
|
Dir.foreach("#{Rails.root}/app/models") do |model_name|
|
||||||
|
|
Loading…
Reference in a new issue