Module: Readthis
- Extended by:
- Readthis
- Included in:
- Readthis
- Defined in:
- lib/readthis.rb,
lib/readthis/cache.rb,
lib/readthis/entity.rb,
lib/readthis/errors.rb,
lib/readthis/version.rb,
lib/readthis/expanders.rb,
lib/readthis/passthrough.rb,
lib/readthis/serializers.rb
Defined Under Namespace
Modules: Expanders, Passthrough Classes: Cache, Entity, Serializers
Constant Summary collapse
- ReadthisError =
Class.new(StandardError)
- SerializersFrozenError =
Class.new(ReadthisError)
- SerializersLimitError =
Class.new(ReadthisError)
- UnknownSerializerError =
Class.new(ReadthisError)
- VERSION =
'1.2.1'
Instance Method Summary collapse
-
#fault_tolerant=(value) ⇒ Object
Toggle fault tolerance for connection errors.
-
#fault_tolerant? ⇒ Boolean
Indicates whether connection error tolerance is enabled.
- #reset! ⇒ Object
-
#serializers ⇒ Object
The current, global, instance of serializers that is used by all cache instances.
Instance Method Details
#fault_tolerant=(value) ⇒ Object
Toggle fault tolerance for connection errors.
33 34 35 |
# File 'lib/readthis.rb', line 33 def fault_tolerant=(value) @fault_tolerant = value end |
#fault_tolerant? ⇒ Boolean
Indicates whether connection error tolerance is enabled. With tolerance enabled every operation will return a ‘nil` value.
25 26 27 |
# File 'lib/readthis.rb', line 25 def fault_tolerant? @fault_tolerant end |
#reset! ⇒ Object
38 39 40 41 |
# File 'lib/readthis.rb', line 38 def reset! @fault_tolerant = nil @serializers = nil end |
#serializers ⇒ Object
The current, global, instance of serializers that is used by all cache instances.
16 17 18 |
# File 'lib/readthis.rb', line 16 def serializers @serializers ||= Readthis::Serializers.new end |