diff options
author | Matija Čupić <matteeyah@gmail.com> | 2018-05-11 18:36:16 +0200 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2018-05-11 18:36:16 +0200 |
commit | 20cfc3fccec75562bdb514587d2c9f7b59554c07 (patch) | |
tree | 88840efdb99030807ad29d15e3548acbe7ad9d64 /app/models/concerns | |
parent | 4c2b56897e17f884f28cb8824dacb724f85f96fb (diff) | |
download | gitlab-ce-20cfc3fccec75562bdb514587d2c9f7b59554c07.tar.gz |
Clear memoization after caching new values
Diffstat (limited to 'app/models/concerns')
-rw-r--r-- | app/models/concerns/redis_cacheable.rb | 2 |
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 |