Module: HatiConfig::Cache
- Included in:
- Setting
- Defined in:
- lib/hati_config/cache.rb
Overview
Cache module provides functionality for caching and refreshing configurations.
Defined Under Namespace
Modules: NumericConfigurable Classes: BackoffConfig, CacheConfig, MemoryAdapter, RedisAdapter, RefreshConfig
Instance Method Summary collapse
-
#cache { ... } ⇒ Object
Defines caching behavior for configurations.
-
#cache_config ⇒ CacheConfig
Gets the cache configuration.
Instance Method Details
#cache { ... } ⇒ Object
Defines caching behavior for configurations.
43 44 45 46 47 |
# File 'lib/hati_config/cache.rb', line 43 def cache(&block) @cache_config = CacheConfig.new @cache_config.instance_eval(&block) if block_given? @cache_config end |
#cache_config ⇒ CacheConfig
Gets the cache configuration.
52 53 54 |
# File 'lib/hati_config/cache.rb', line 52 def cache_config @cache_config ||= CacheConfig.new end |