Module: 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.3.0'.freeze
Class 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.
Class Method Details
.fault_tolerant=(value) ⇒ Object
Toggle fault tolerance for connection errors.
31 32 33 |
# File 'lib/readthis.rb', line 31 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.
23 24 25 |
# File 'lib/readthis.rb', line 23 def fault_tolerant? @fault_tolerant end |
.reset! ⇒ Object
36 37 38 39 |
# File 'lib/readthis.rb', line 36 def reset! @fault_tolerant = nil @serializers = nil end |
.serializers ⇒ Object
The current, global, instance of serializers that is used by all cache instances.
14 15 16 |
# File 'lib/readthis.rb', line 14 def serializers @serializers ||= Readthis::Serializers.new end |