Class: InfoparkComponentCache::Guards::ValuePresent
- Inherits:
-
ConsistencyGuard
- Object
- ConsistencyGuard
- InfoparkComponentCache::Guards::ValuePresent
- Defined in:
- lib/infopark_component_cache/guards/value_present.rb
Overview
This Guard class ensures that the cache object for the component exists, i.e. when reading the cache with component’s key one does get a value
Instance Attribute Summary
Attributes inherited from ConsistencyGuard
Instance Method Summary collapse
Methods inherited from ConsistencyGuard
Constructor Details
This class inherits a constructor from InfoparkComponentCache::ConsistencyGuard
Instance Method Details
#consistent? ⇒ Boolean
11 12 13 |
# File 'lib/infopark_component_cache/guards/value_present.rb', line 11 def consistent? cache.exist?(component.cache_key) end |
#guard! ⇒ Object
15 16 17 |
# File 'lib/infopark_component_cache/guards/value_present.rb', line 15 def guard! # noop end |