Handle false case for @factory_cache_enabled in Formulary

This commit is contained in:
Rylan Polster 2025-08-24 14:06:48 -04:00
parent 4410388043
commit 9a7fdd988c
No known key found for this signature in database

View File

@ -34,14 +34,14 @@ module Formulary
# @api internal
sig { void }
def self.enable_factory_cache!
@factory_cache_enabled = T.let(true, T.nilable(T::Boolean))
@factory_cache_enabled = T.let(true, T.nilable(TrueClass))
cache[platform_cache_tag] ||= {}
cache[platform_cache_tag][:formulary_factory] ||= {}
end
sig { returns(T::Boolean) }
def self.factory_cached?
!@factory_cache_enabled.nil?
!!@factory_cache_enabled
end
sig { returns(String) }