Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-08-04 06:09:50 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-08-04 06:09:50 +0300
commit5da864991125a56a48b005389f84ecedf46f09eb (patch)
tree93c00d53e68a34a78e4a03c1044db5a280b5bdcf /lib
parent20922701092f8a34c6ca6afca09e38587662c00e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/diff/stats_cache.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/diff/stats_cache.rb b/lib/gitlab/diff/stats_cache.rb
index 7915d146738..a918fc08201 100644
--- a/lib/gitlab/diff/stats_cache.rb
+++ b/lib/gitlab/diff/stats_cache.rb
@@ -6,7 +6,8 @@ module Gitlab
include Gitlab::Utils::StrongMemoize
EXPIRATION = 1.week
- VERSION = 1
+ # The DiffStats#as_json representation is tied to the Gitaly protobuf version
+ VERSION = Gem.loaded_specs['gitaly'].version.to_s
def initialize(cachable_key:)
@cachable_key = cachable_key
@@ -29,6 +30,7 @@ module Gitlab
return unless stats
cache.write(key, stats.as_json, expires_in: EXPIRATION)
+ clear_memoization(:cached_values)
end
def clear