summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2018-03-14 16:05:06 +0000
committerSean McGivern <sean@gitlab.com>2018-03-15 11:49:53 +0000
commitdb908826656b78e099ab5e1d99d4524ad0751d13 (patch)
tree211e9a9e39f50ccd08248d7248b1b5dd7368c9c4 /lib
parent6cd7f679d065e08f58d6dc9e2debf4f1a9cbcbe1 (diff)
downloadgitlab-ce-db908826656b78e099ab5e1d99d4524ad0751d13.tar.gz
This may lead to some being evicted and having to be cached again, but many MRs get closed or updated in that time anyway.
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/diff/file_collection/merge_request_diff.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/diff/file_collection/merge_request_diff.rb b/lib/gitlab/diff/file_collection/merge_request_diff.rb
index 9c1f85c70d6..c358ae428cf 100644
--- a/lib/gitlab/diff/file_collection/merge_request_diff.rb
+++ b/lib/gitlab/diff/file_collection/merge_request_diff.rb
@@ -72,7 +72,7 @@ module Gitlab
end
def store_highlight_cache
- Rails.cache.write(cache_key, highlight_cache) if @highlight_cache_was_empty
+ Rails.cache.write(cache_key, highlight_cache, expires_in: 1.week) if @highlight_cache_was_empty
end
def cacheable?(diff_file)