From: Tom Hughes Date: Tue, 18 Feb 2014 09:43:12 +0000 (+0000) Subject: Enable caching for certain taginfo responses X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/392a811897ecd812f92b66b497a19bdc9d232984?hp=2d96a0d42830fa190e987a31d0d6b766127c5ba5;ds=sidebyside Enable caching for certain taginfo responses --- diff --git a/cookbooks/taginfo/recipes/default.rb b/cookbooks/taginfo/recipes/default.rb index 2faafad1c..e0b6d34c2 100644 --- a/cookbooks/taginfo/recipes/default.rb +++ b/cookbooks/taginfo/recipes/default.rb @@ -47,6 +47,9 @@ gem_package "sinatra" gem_package "sinatra-r18n" gem_package "rack-contrib" +apache_module "cache" +apache_module "disk_cache" + template "/etc/cron.d/taginfo" do source "cron.erb" owner "root" diff --git a/cookbooks/taginfo/templates/default/apache.erb b/cookbooks/taginfo/templates/default/apache.erb index 9ebca518e..6c700972c 100644 --- a/cookbooks/taginfo/templates/default/apache.erb +++ b/cookbooks/taginfo/templates/default/apache.erb @@ -17,5 +17,8 @@ RackEnv production PassengerMinInstances 10 PassengerPreStart http://<%= @name %>/ + + CacheEnable disk /api + CacheEnable disk /embed <% end -%>