summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2017-08-18 19:56:16 +0000
committerRobert Speicher <robert@gitlab.com>2017-08-18 19:56:16 +0000
commit8936a92e811f51011eb405e379b0ca563b34936f (patch)
tree9b7bcdc7dca4a13857b7f8b11e1ebe054bb8cc30
parentcd9b6175564f4e50db0ac54350e93ed32dc08b04 (diff)
parent630a83448b5bf20c10bec2392977fbfd656707f0 (diff)
downloadgitlab-ce-8936a92e811f51011eb405e379b0ca563b34936f.tar.gz
Merge branch 'dm-commit-cache-i18n' into 'master'
Add current locale to commit partial cache key Closes #36591 See merge request !13669
-rw-r--r--app/views/projects/commits/_commit.html.haml2
-rw-r--r--changelogs/unreleased/dm-commit-cache-i18n.yml5
2 files changed, 6 insertions, 1 deletions
diff --git a/app/views/projects/commits/_commit.html.haml b/app/views/projects/commits/_commit.html.haml
index e7da47032be..7e8a5a38086 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.full_path, commit.id, current_application_settings, note_count, @path.presence, current_controller?(:commits)]
+- cache_key = [project.full_path, commit.id, current_application_settings, note_count, @path.presence, current_controller?(:commits), I18n.locale]
- 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-cache-i18n.yml b/changelogs/unreleased/dm-commit-cache-i18n.yml
new file mode 100644
index 00000000000..d47226fd408
--- /dev/null
+++ b/changelogs/unreleased/dm-commit-cache-i18n.yml
@@ -0,0 +1,5 @@
+---
+title: Commit rows would occasionally render with the wrong language
+merge_request:
+author:
+type: fixed