Class: Masking::DataMaskProcessor::Cache
- Inherits:
-
Object
- Object
- Masking::DataMaskProcessor::Cache
- Defined in:
- lib/masking/data_mask_processor/cache.rb
Class Method Summary collapse
Class Method Details
.clear ⇒ Object
onlu for test
17 18 19 |
# File 'lib/masking/data_mask_processor/cache.rb', line 17 def self.clear @cache = {} end |
.fetch_or_store_if_no_cache(table:, proc:) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/masking/data_mask_processor/cache.rb', line 6 def self.fetch_or_store_if_no_cache(table:, proc:) @cache ||= {} if @cache.key?(table) @cache[table] else @cache[table] = proc.call end end |