Exception: TypedCache::CacheMissError
- Defined in:
- lib/typed_cache/errors.rb
Overview
Cache miss (when expecting a value to exist)
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Instance Method Summary collapse
- #cache_miss? ⇒ Boolean
-
#initialize(key) ⇒ CacheMissError
constructor
A new instance of CacheMissError.
Constructor Details
#initialize(key) ⇒ CacheMissError
Returns a new instance of CacheMissError.
62 63 64 65 |
# File 'lib/typed_cache/errors.rb', line 62 def initialize(key) super("Cache miss for key: #{key}") @key = key end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
59 60 61 |
# File 'lib/typed_cache/errors.rb', line 59 def key @key end |
Instance Method Details
#cache_miss? ⇒ Boolean
68 69 70 |
# File 'lib/typed_cache/errors.rb', line 68 def cache_miss? true end |