ReactiveCaching#clear_reactive_cache! should clear the not keep the cache alive

This commit is contained in:
Tiago Botelho 2018-06-01 14:15:13 +01:00
parent 4b0ff7c742
commit 2535834f8a
3 changed files with 8 additions and 0 deletions

View file

@ -74,6 +74,7 @@ module ReactiveCaching
def clear_reactive_cache!(*args) def clear_reactive_cache!(*args)
Rails.cache.delete(full_reactive_cache_key(*args)) Rails.cache.delete(full_reactive_cache_key(*args))
Rails.cache.delete(alive_reactive_cache_key(*args))
end end
def exclusively_update_reactive_cache!(*args) def exclusively_update_reactive_cache!(*args)

View file

@ -0,0 +1,6 @@
---
title: Updates ReactiveCaching clear_reactive_caching method to clear both data and
alive caching
merge_request: 19311
author:
type: fixed

View file

@ -94,6 +94,7 @@ describe ReactiveCaching, :use_clean_rails_memory_store_caching do
end end
it { expect(instance.result).to be_nil } it { expect(instance.result).to be_nil }
it { expect(reactive_cache_alive?(instance)).to be_falsy }
end end
describe '#exclusively_update_reactive_cache!' do describe '#exclusively_update_reactive_cache!' do