summaryrefslogtreecommitdiff
path: root/app/views/projects/commits/_commit.html.haml
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-10-01 22:11:10 -0700
committerStan Hu <stanhu@gmail.com>2015-10-02 11:24:17 -0700
commitdbc85bfa01d9ee37e466bd537a20f1cfde89be9f (patch)
treec8c05ddfa8fe59ca10232f32e9e8ec855ec4690b /app/views/projects/commits/_commit.html.haml
parentb5c12f742ab7431257cc685477d3be16c8cc5f0e (diff)
downloadgitlab-ce-dbc85bfa01d9ee37e466bd537a20f1cfde89be9f.tar.gz
Fix bug where transferring a project would result in stale commit links
Transferring a project to another namespace updates the project's updated_at field, but since the cache key did not depend on the object, the page fragments were not invalidated. This resulted in stale links to the commits. Changing the cache key to use the object pathname solves this issue. Closes gitlab-org/omnibus-gitlab#843
Diffstat (limited to 'app/views/projects/commits/_commit.html.haml')
-rw-r--r--app/views/projects/commits/_commit.html.haml2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/projects/commits/_commit.html.haml b/app/views/projects/commits/_commit.html.haml
index efad4cb1473..cddd5aa3a83 100644
--- a/app/views/projects/commits/_commit.html.haml
+++ b/app/views/projects/commits/_commit.html.haml
@@ -5,7 +5,7 @@
- note_count = notes.user.count
- ci_commit = project.ci_commit(commit.sha)
-- cache_key = [project.id, commit.id, note_count]
+- cache_key = [project.path_with_namespace, commit.id, note_count]
- cache_key.push(ci_commit.status) if ci_commit
= cache(cache_key) do