Module: Gitlab::Experiment::Caching
- Included in:
- Gitlab::Experiment
- Defined in:
- lib/gitlab/experiment/caching.rb
Instance Method Summary collapse
Instance Method Details
#cache(&block) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/gitlab/experiment/caching.rb', line 6 def cache(&block) return yield unless (cache = Configuration.cache) key, migrations = cache_strategy migrated_cache(cache, migrations || [], key) or cache.fetch(key, &block) end |