From 392a811897ecd812f92b66b497a19bdc9d232984 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 18 Feb 2014 09:43:12 +0000 Subject: [PATCH 1/1] Enable caching for certain taginfo responses --- cookbooks/taginfo/recipes/default.rb | 3 +++ cookbooks/taginfo/templates/default/apache.erb | 3 +++ 2 files changed, 6 insertions(+) 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 -%> -- 2.43.2