Enable caching for certain taginfo responses
authorTom Hughes <tom@compton.nu>
Tue, 18 Feb 2014 09:43:12 +0000 (09:43 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 18 Feb 2014 09:43:12 +0000 (09:43 +0000)
cookbooks/taginfo/recipes/default.rb
cookbooks/taginfo/templates/default/apache.erb

index 2faafad1caaa8a902370859197acc6fcc370e45e..e0b6d34c24843be9cf089a93fb3f83c00fe706b1 100644 (file)
@@ -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"
index 9ebca518e907a6f60d3e11f0d7b8ae9b4407d1a1..6c700972c748e25bb15b0ae9a3c091acec40f3ac 100644 (file)
@@ -17,5 +17,8 @@
         RackEnv production
         PassengerMinInstances 10
         PassengerPreStart http://<%= @name %>/
+
+        CacheEnable disk /api
+        CacheEnable disk /embed
 </VirtualHost>
 <% end -%>