summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2018-05-11 18:36:16 +0200
committerMatija Čupić <matteeyah@gmail.com>2018-05-11 18:36:16 +0200
commit20cfc3fccec75562bdb514587d2c9f7b59554c07 (patch)
tree88840efdb99030807ad29d15e3548acbe7ad9d64
parent4c2b56897e17f884f28cb8824dacb724f85f96fb (diff)
downloadgitlab-ce-20cfc3fccec75562bdb514587d2c9f7b59554c07.tar.gz
Clear memoization after caching new values
-rw-r--r--app/models/concerns/redis_cacheable.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/concerns/redis_cacheable.rb b/app/models/concerns/redis_cacheable.rb
index bc86bbe6525..8bd0df8dfbe 100644
--- a/app/models/concerns/redis_cacheable.rb
+++ b/app/models/concerns/redis_cacheable.rb
@@ -31,6 +31,8 @@ module RedisCacheable
Gitlab::Redis::SharedState.with do |redis|
redis.set(cache_attribute_key, values.to_json, ex: CACHED_ATTRIBUTES_EXPIRY_TIME)
end
+
+ clear_memoization(:cached_attributes)
end
private