diff --git a/lib/sinatra/base.rb b/lib/sinatra/base.rb
index <HASH>..<HASH> 100644
--- a/lib/sinatra/base.rb
+++ b/lib/sinatra/base.rb
@@ -264,7 +264,11 @@ module Sinatra
       end
 
       values = values.map { |value| value.to_s.tr('_','-') }
-      hash.each { |k,v| values << [k.to_s.tr('_', '-'), v].join('=') }
+      hash.each do |key, value|
+        key = key.to_s.tr('_', '-')
+        value = value.to_i if key == "max-age"
+        values << [key, value].join('=')
+      end
 
       response['Cache-Control'] = values.join(', ') if values.any?
     end
diff --git a/test/helpers_test.rb b/test/helpers_test.rb
index <HASH>..<HASH> 100644
--- a/test/helpers_test.rb
+++ b/test/helpers_test.rb
@@ -426,7 +426,7 @@ class HelpersTest < Test::Unit::TestCase
     setup do
       mock_app {
         get '/' do
-          cache_control :public, :no_cache, :max_age => 60
+          cache_control :public, :no_cache, :max_age => 60.0
           'Hello World'
         end
       }
Make sure max-age is an integer (as specified by RFC<I>). Fixes #<I>.