aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/application.rb4
-rw-r--r--config/general.yml-example5
-rw-r--r--config/packages1
3 files changed, 10 insertions, 0 deletions
diff --git a/config/application.rb b/config/application.rb
index 4fc6f83e5..f2b662abc 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -55,6 +55,10 @@ module Alaveteli
# will be in this time zone
config.time_zone = ::AlaveteliConfiguration::time_zone
+ # Set the cache to use a memcached backend
+ config.cache_store = :mem_cache_store, { :namespace => AlaveteliConfiguration::domain }
+ config.action_dispatch.rack_cache = nil
+
config.after_initialize do |app|
require 'routing_filters.rb'
# Add a catch-all route to force routing errors to be handled by the application,
diff --git a/config/general.yml-example b/config/general.yml-example
index 60eb5ae1c..b8d9fc854 100644
--- a/config/general.yml-example
+++ b/config/general.yml-example
@@ -209,3 +209,8 @@ PUBLIC_BODY_LIST_FALLBACK_TO_DEFAULT_LOCALE: false
# If true, while in development mode, try to send mail by SMTP to port
# 1025 (the port the mailcatcher listens on by default):
USE_MAILCATCHER_IN_DEVELOPMENT: true
+
+# Use memcached to cache HTML fragments for better performance. Will
+# only have an effect in environments where
+# config.action_controller.perform_caching is set to true
+CACHE_FRAGMENTS: true
diff --git a/config/packages b/config/packages
index 8bb00a849..9a07c5f20 100644
--- a/config/packages
+++ b/config/packages
@@ -38,3 +38,4 @@ bundler
sqlite3
libsqlite3-dev
libicu-dev
+memcached