summaryrefslogtreecommitdiffstats
path: root/app/views/blobs
diff options
context:
space:
mode:
authorJohan Sørensen <johan@johansorensen.com>2009-05-19 13:02:06 +0200
committerJohan Sørensen <johan@johansorensen.com>2009-05-19 13:02:06 +0200
commit43264d19e9a9b06d16195d9f199e5551f005aff0 (patch)
tree353c6aff67960bfff99d6b80be1b43ee2b4ffa98 /app/views/blobs
parentb13902564a5efa7fb0660cc9ebaf78a8308d9317 (diff)
downloadgitorious-mainline-outdated-43264d19e9a9b06d16195d9f199e5551f005aff0.zip
gitorious-mainline-outdated-43264d19e9a9b06d16195d9f199e5551f005aff0.tar.gz
gitorious-mainline-outdated-43264d19e9a9b06d16195d9f199e5551f005aff0.tar.bz2
Use the sha1 of the blobs, not the path, as part of the cache key
Diffstat (limited to 'app/views/blobs')
-rw-r--r--app/views/blobs/history.html.erb2
-rw-r--r--app/views/blobs/show.html.erb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/views/blobs/history.html.erb b/app/views/blobs/history.html.erb
index c30b11f..c2514e0 100644
--- a/app/views/blobs/history.html.erb
+++ b/app/views/blobs/history.html.erb
@@ -22,7 +22,7 @@
<h1><%= t("views.blobs.heading", :ref => h(desplat_path(@ref)), :path => h(desplat_path(@path))) -%></h1>
-<% cache([@project, @repository, :blob_history, @ref, @path], {:expires_in => 20.minutes}) do -%>
+<% cache([@project, @repository, :blob_history, @ref, @blob.id], {:expires_in => 20.minutes}) do -%>
<%= render :partial => "commits/log", :locals => { :no_pagination => true } -%>
<% end -%>
diff --git a/app/views/blobs/show.html.erb b/app/views/blobs/show.html.erb
index ad45c56..d82676a 100644
--- a/app/views/blobs/show.html.erb
+++ b/app/views/blobs/show.html.erb
@@ -52,7 +52,7 @@
<!-- mime: <%= @blob.mime_type -%> -->
<% if textual?(@blob) && !too_big_to_render?(@blob.size) -%>
- <% cache(blob_path(@commit.id, @path)) do -%>
+ <% cache([:blob_render, @commit.id, @blob.id]) do -%>
<%= render_highlighted(@blob.data, current_path.last || "") -%>
<% end -%>
<% elsif textual?(@blob) && too_big_to_render?(@blob.size) -%>