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
path: root/app
diff options
context:
space:
mode:
authorReuben Pereira <rpereira@gitlab.com>2019-02-18 14:24:00 +0300
committerNick Thomas <nick@gitlab.com>2019-02-18 14:24:00 +0300
commit0e7a9e46d25813670bc9d37b59d577bda4aeb3f7 (patch)
tree717a8527bd25b8a57e1e35bac89052e88d344622 /app
parent1d229689588e0e22b5cee57f6c8d2ddcc7f0822b (diff)
Allow blank values to be stored in reactive cache
Reactive caching concern was using .present? to determine if it got a valid value from the cache. This returns false for values such as false, [], {}. Change this check to !.nil? instead.
Diffstat (limited to 'app')
-rw-r--r--app/models/concerns/reactive_caching.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/concerns/reactive_caching.rb b/app/models/concerns/reactive_caching.rb
index d3572875fb3..de77ca3e963 100644
--- a/app/models/concerns/reactive_caching.rb
+++ b/app/models/concerns/reactive_caching.rb
@@ -76,7 +76,7 @@ module ReactiveCaching
begin
data = Rails.cache.read(full_reactive_cache_key(*args))
- yield data if data.present?
+ yield data unless data.nil?
rescue InvalidateReactiveCache
refresh_reactive_cache!(*args)
nil