Permalink
Browse files

caching for 5 minutes instead of six

  • Loading branch information...
1 parent 1b19820 commit 6326ba1eaac6a64f2de11139674d3f22d6fbb4c5 Pedro Belo committed Mar 12, 2009
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/caches_page_via_http.rb
  2. +1 −1 test/caches_page_via_http_test.rb
@@ -14,7 +14,7 @@ def caches_page(*actions)
return unless perform_caching
options = actions.respond_to?(:extract_options!) ? actions.extract_options! : {}
after_filter({:only => actions}.merge(options)) do |c|
- c.response.headers['Cache-Control'] = 'public, max-age=360'
+ c.response.headers['Cache-Control'] = 'public, max-age=300'
c.response.headers.delete('cookie') # caching the page means no cookies
end
end
@@ -40,7 +40,7 @@ def test_not_crashing
def test_cache_control_header
get 'index'
- assert_equal 'public, max-age=360', @response.headers['Cache-Control']
+ assert_equal 'public, max-age=300', @response.headers['Cache-Control']
end
def test_doesnt_affect_actions_not_cached

0 comments on commit 6326ba1

Please sign in to comment.