Skip to content

Allow ReactiveCaching to support nil value

Fabio Pitino requested to merge allow-reactive-caching-of-nil into master

What does this MR do?

In https://gitlab.com/gitlab-org/gitlab-ce/issues/64176 we are experiencing a surge in numbers of Sidekiq workers being scheduled by ReactiveCaching.

According to this https://gitlab.com/gitlab-org/gitlab-ce/issues/64176#note_189215002 analysis I figured that the fix could be using Rails.cache.exist?(...) rather than !!Rails.cache.read(...) which transformed nil into false and caused a ReactiveCachingWorker to be scheduled any time a method using with_reactive_cache was called.

Does this MR meet the acceptance criteria?

Conformity

Performance and testing

Edited by Kamil Trzciński

Merge request reports