summaryrefslogtreecommitdiffstats
path: root/app/controllers/blobs_controller.rb
diff options
context:
space:
mode:
authorJohan Sørensen <johan@johansorensen.com>2009-03-02 14:12:05 +0100
committerJohan Sørensen <johan@johansorensen.com>2009-04-22 15:15:20 +0200
commit31234820b3a51db40fcaa8c1cb34dd2b593a2e21 (patch)
tree06c17dc5b2d8114536bd4d0030d13e162fc33f1a /app/controllers/blobs_controller.rb
parent8cd7559c24103ac08ed40682f7581ca6fb5840fd (diff)
downloadgitorious-mainline-outdated-31234820b3a51db40fcaa8c1cb34dd2b593a2e21.zip
gitorious-mainline-outdated-31234820b3a51db40fcaa8c1cb34dd2b593a2e21.tar.gz
gitorious-mainline-outdated-31234820b3a51db40fcaa8c1cb34dd2b593a2e21.tar.bz2
Use the builtin expires_in instead of the home-rolled cache_for for setting max-age,
This also uses the correct format on the header.
Diffstat (limited to 'app/controllers/blobs_controller.rb')
-rw-r--r--app/controllers/blobs_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/blobs_controller.rb b/app/controllers/blobs_controller.rb
index 46d85ae..1fa34b4 100644
--- a/app/controllers/blobs_controller.rb
+++ b/app/controllers/blobs_controller.rb
@@ -35,7 +35,7 @@ class BlobsController < ApplicationController
unless @blob.respond_to?(:data) # it's a tree
redirect_to project_repository_tree_path(@project, @repository, @commit.id, @path)
end
- cache_for 2.minutes
+ expires_in 2.minutes
end
def raw
@@ -52,7 +52,7 @@ class BlobsController < ApplicationController
flash[:error] = I18n.t "blogs_controller.raw_error"
redirect_to project_repository_path(@project, @repository) and return
end
- cache_for 2.minutes
+ expires_in 2.minutes
render :text => @blob.data, :content_type => @blob.mime_type
end