From 12e939672cf5a64cb5d7185775cec7de65236ab2 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Thu, 22 Jun 2017 13:42:34 -0500 Subject: Adjust commit partial cache key to fix browse buttons --- app/views/projects/commits/_commit.html.haml | 2 +- changelogs/unreleased/dm-commit-row-browse-button.yml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelogs/unreleased/dm-commit-row-browse-button.yml diff --git a/app/views/projects/commits/_commit.html.haml b/app/views/projects/commits/_commit.html.haml index 11de6915961..8a4ef5a45b3 100644 --- a/app/views/projects/commits/_commit.html.haml +++ b/app/views/projects/commits/_commit.html.haml @@ -5,7 +5,7 @@ - notes = commit.notes - note_count = notes.user.count -- cache_key = [project.path_with_namespace, commit.id, current_application_settings, note_count] +- cache_key = [project.path_with_namespace, commit.id, current_application_settings, note_count, @path.presence, current_controller?(:commits)] - cache_key.push(commit.status(ref)) if commit.status(ref) = cache(cache_key, expires_in: 1.day) do diff --git a/changelogs/unreleased/dm-commit-row-browse-button.yml b/changelogs/unreleased/dm-commit-row-browse-button.yml new file mode 100644 index 00000000000..4689dc3b0e2 --- /dev/null +++ b/changelogs/unreleased/dm-commit-row-browse-button.yml @@ -0,0 +1,4 @@ +--- +title: Adjust commit partial cache key to fix browse buttons +merge_request: +author: -- cgit v1.2.3 From 58454d9b4222f0be5211e6672f656f5c4883b547 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Tue, 27 Jun 2017 14:58:43 +0000 Subject: Update changelog item [ci skip] --- changelogs/unreleased/dm-commit-row-browse-button.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelogs/unreleased/dm-commit-row-browse-button.yml b/changelogs/unreleased/dm-commit-row-browse-button.yml index 4689dc3b0e2..4240a7de5de 100644 --- a/changelogs/unreleased/dm-commit-row-browse-button.yml +++ b/changelogs/unreleased/dm-commit-row-browse-button.yml @@ -1,4 +1,4 @@ --- -title: Adjust commit partial cache key to fix browse buttons +title: Fix inconsistent display of the "Browse files" button in the commit list merge_request: author: -- cgit v1.2.3