diff options
author | Nick Thomas <nick@gitlab.com> | 2018-06-01 14:19:34 +0000 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2018-06-01 14:19:34 +0000 |
commit | c3450ab9eec31a525e3559520b8a010ed5c2c2e8 (patch) | |
tree | 700830d35eb8c46bc68e32ddc60564bdcdc76a84 | |
parent | 72702275373d466f0f55c925e05c34bba1326761 (diff) | |
parent | 2535834f8ad35e7691384454013b5938a0a2af5d (diff) | |
download | gitlab-ce-c3450ab9eec31a525e3559520b8a010ed5c2c2e8.tar.gz |
Merge branch 'reactive-caching-alive-bug' into 'master'
ReactiveCaching#clear_reactive_cache! should not keep the cache alive
See merge request gitlab-org/gitlab-ce!19311
-rw-r--r-- | app/models/concerns/reactive_caching.rb | 1 | ||||
-rw-r--r-- | changelogs/unreleased/reactive-caching-alive-bug.yml | 6 | ||||
-rw-r--r-- | spec/models/concerns/reactive_caching_spec.rb | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/app/models/concerns/reactive_caching.rb b/app/models/concerns/reactive_caching.rb index eef9caf1c8e..be0a5b49012 100644 --- a/app/models/concerns/reactive_caching.rb +++ b/app/models/concerns/reactive_caching.rb @@ -74,6 +74,7 @@ module ReactiveCaching def clear_reactive_cache!(*args) Rails.cache.delete(full_reactive_cache_key(*args)) + Rails.cache.delete(alive_reactive_cache_key(*args)) end def exclusively_update_reactive_cache!(*args) diff --git a/changelogs/unreleased/reactive-caching-alive-bug.yml b/changelogs/unreleased/reactive-caching-alive-bug.yml new file mode 100644 index 00000000000..2fdc3a7e7e1 --- /dev/null +++ b/changelogs/unreleased/reactive-caching-alive-bug.yml @@ -0,0 +1,6 @@ +--- +title: Updates ReactiveCaching clear_reactive_caching method to clear both data and + alive caching +merge_request: 19311 +author: +type: fixed diff --git a/spec/models/concerns/reactive_caching_spec.rb b/spec/models/concerns/reactive_caching_spec.rb index 4570dbb1d8e..f2a3df50c1a 100644 --- a/spec/models/concerns/reactive_caching_spec.rb +++ b/spec/models/concerns/reactive_caching_spec.rb @@ -94,6 +94,7 @@ describe ReactiveCaching, :use_clean_rails_memory_store_caching do end it { expect(instance.result).to be_nil } + it { expect(reactive_cache_alive?(instance)).to be_falsy } end describe '#exclusively_update_reactive_cache!' do |