Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

treat dalli_store to say :mem_cache_store

ulferts07186be4049e
diff --git a/lib/open_project/configuration.rb b/lib/open_project/configuration.rb
index d39d4172490..ee5ba15ad3a 100644
--- a/lib/open_project/configuration.rb
+++ b/lib/open_project/configuration.rb
@@ -289,20 +289,25 @@ module OpenProject
def configure_cache(application_config)
return unless override_cache_config? application_config
- # rails defaults to :file_store, use :dalli when :memcaches is configured in configuration.yml
+ # rails defaults to :file_store, use :mem_cache_store when :memcache is configured in configuration.yml
+ # Also use :mem_cache_store for when :dalli_store is configured
cache_store = @config['rails_cache_store'].try(:to_sym)
- if cache_store == :memcache
+
+ case cache_store
+ when :memcache, :dalli_store
cache_config = [:mem_cache_store]
cache_config << @config['cache_memcache_server'] \
if @config['cache_memcache_server']
# default to :file_store
- elsif cache_store.nil? || cache_store == :file_store
+ when NilClass, :file_store
cache_config = [:file_store, Rails.root.join('tmp/cache')]
else
cache_config = [cache_store]
end
+
parameters = cache_parameters(@config)
cache_config << parameters if parameters.size > 0
+
application_config.cache_store = cache_config
end