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
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2018-05-11 19:36:16 +0300
committerMatija Čupić <matteeyah@gmail.com>2018-05-11 19:36:16 +0300
commit20cfc3fccec75562bdb514587d2c9f7b59554c07 (patch)
tree88840efdb99030807ad29d15e3548acbe7ad9d64 /app/models/concerns/redis_cacheable.rb
parent4c2b56897e17f884f28cb8824dacb724f85f96fb (diff)
Clear memoization after caching new values
Diffstat (limited to 'app/models/concerns/redis_cacheable.rb')
-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