diff options
author | Sean McGivern <sean@gitlab.com> | 2016-08-31 15:04:51 +0100 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2016-08-31 15:12:31 +0100 |
commit | 52ab33a3fa1bd31e8e01ea8b9c89d8c08dbeff82 (patch) | |
tree | 102558fd8310b4161cde7afe6686492f9166189d /app | |
parent | ee61c4037e5e85df8fb9e45a96df68fb0625c605 (diff) | |
download | gitlab-ce-52ab33a3fa1bd31e8e01ea8b9c89d8c08dbeff82.tar.gz |
Expire commit view partial after a dayexpire-commit-info-partials-sooner
We rarely use Russian-doll caching in views, and when we do, it's
typically with a naturally-invalidating key. In the case of the commit
partial, though, the author lookup isn't part of the cache key - because
we're not going to use the state of the users table - and so a new email
address can take up to two weeks to show against the commits list.
Limiting this to a day still caches the partial for a healthy amount of
time, without as bad a worst case scenario.
Diffstat (limited to 'app')
-rw-r--r-- | app/views/projects/commits/_commit.html.haml | 2 |
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 fd888f41b1e..389477d0927 100644 --- a/app/views/projects/commits/_commit.html.haml +++ b/app/views/projects/commits/_commit.html.haml @@ -7,7 +7,7 @@ - cache_key = [project.path_with_namespace, commit.id, current_application_settings, note_count] - cache_key.push(commit.status) if commit.status -= cache(cache_key) do += cache(cache_key, expires_in: 1.day) do %li.commit.js-toggle-container{ id: "commit-#{commit.short_id}" } = author_avatar(commit, size: 36) |