diff options
author | francis <francis> | 2009-07-14 23:02:06 +0000 |
---|---|---|
committer | francis <francis> | 2009-07-14 23:02:06 +0000 |
commit | 0ceafaed64afbb0fd5875ee010ad76151f0564fc (patch) | |
tree | 650f6908a91fd529880cb92a7635182fe73bc212 | |
parent | 5a34a09c42b26094588c18033bc749febe7819d5 (diff) |
Cache a few more things with Squid.
-rw-r--r-- | app/controllers/general_controller.rb | 4 | ||||
-rw-r--r-- | app/controllers/help_controller.rb | 3 | ||||
-rw-r--r-- | app/controllers/public_body_controller.rb | 4 | ||||
-rw-r--r-- | app/controllers/request_controller.rb | 5 |
4 files changed, 10 insertions, 6 deletions
diff --git a/app/controllers/general_controller.rb b/app/controllers/general_controller.rb index db533a4e4..edc80c5b9 100644 --- a/app/controllers/general_controller.rb +++ b/app/controllers/general_controller.rb @@ -5,7 +5,7 @@ # Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: general_controller.rb,v 1.48 2009-07-14 22:48:50 francis Exp $ +# $Id: general_controller.rb,v 1.49 2009-07-14 23:02:06 francis Exp $ class GeneralController < ApplicationController @@ -30,7 +30,7 @@ class GeneralController < ApplicationController @successful_requests = [] end - expires_in 10.minutes, :private => false + expires_in 10.minutes, :private => false # cache via squid reverse proxy end # Just does a redirect from ?query= search to /query diff --git a/app/controllers/help_controller.rb b/app/controllers/help_controller.rb index 3cce00d1e..b792738a4 100644 --- a/app/controllers/help_controller.rb +++ b/app/controllers/help_controller.rb @@ -4,11 +4,12 @@ # Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: help_controller.rb,v 1.10 2008-11-07 00:01:49 francis Exp $ +# $Id: help_controller.rb,v 1.11 2009-07-14 23:02:06 francis Exp $ class HelpController < ApplicationController def about + expires_in 10.minutes, :private => false # cache via squid reverse proxy end def unhappy diff --git a/app/controllers/public_body_controller.rb b/app/controllers/public_body_controller.rb index c1b39e063..df4562efe 100644 --- a/app/controllers/public_body_controller.rb +++ b/app/controllers/public_body_controller.rb @@ -4,7 +4,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: public_body_controller.rb,v 1.2 2009-07-01 18:16:33 francis Exp $ +# $Id: public_body_controller.rb,v 1.3 2009-07-14 23:02:06 francis Exp $ class PublicBodyController < ApplicationController # XXX tidy this up with better error messages, and a more standard infrastructure for the redirect to canonical URL @@ -90,6 +90,8 @@ class PublicBodyController < ApplicationController @description = @tag end end + + expires_in 10.minutes, :private => false # cache via squid reverse proxy end end diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb index 0ebde4535..3b9aa422b 100644 --- a/app/controllers/request_controller.rb +++ b/app/controllers/request_controller.rb @@ -4,7 +4,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: request_controller.rb,v 1.166 2009-07-14 22:48:50 francis Exp $ +# $Id: request_controller.rb,v 1.167 2009-07-14 23:02:06 francis Exp $ class RequestController < ApplicationController @@ -103,7 +103,6 @@ class RequestController < ApplicationController query = 'variety:response (status:successful OR status:partially_successful)' sortby = "described" @track_thing = TrackThing.create_track_for_all_successful_requests - expires_in 10.minutes, :private => false else raise "unknown request list view " + @view.to_s end @@ -111,6 +110,8 @@ class RequestController < ApplicationController @title = @title + " (page " + @page.to_s + ")" if (@page > 1) @feed_autodetect = [ { :url => do_track_url(@track_thing, 'feed'), :title => @track_thing.params[:title_in_rss] } ] + + expires_in 10.minutes, :private => false # cache via squid reverse proxy end # Page new form posts to |