module Readthis

Constants

ReadthisError

This is the base error that all other specific errors inherit from, making it possible to rescue the `ReadthisError` superclass.

This isn't raised by itself.

SerializersFrozenError

Raised when attempting to modify the serializers after they have been frozen.

SerializersLimitError

Raised when attempting to add a new serializer after the limit of 7 is reached.

UnknownCommandError

Raised when an unknown script is called.

UnknownSerializerError

Raised when a serializer was specified, but hasn't been configured for usage.

VERSION

Public Class Methods

fault_tolerant=(value) click to toggle source

Toggle fault tolerance for connection errors.

@param [Boolean] value The new value for fault tolerance

# File lib/readthis.rb, line 33
def fault_tolerant=(value)
  @fault_tolerant = value
end
fault_tolerant?() click to toggle source

Indicates whether connection error tolerance is enabled. With tolerance enabled every operation will return a `nil` value.

@return [Boolean] True for enabled, false for disabled

# File lib/readthis.rb, line 25
def fault_tolerant?
  @fault_tolerant
end
reset!() click to toggle source

@private

# File lib/readthis.rb, line 38
def reset!
  @fault_tolerant = nil
  @serializers = nil
end
serializers() click to toggle source

The current, global, instance of serializers that is used by all cache instances.

@return [Readthis::Serializers] An cached Serializers instance

@see readthis/serializers

# File lib/readthis.rb, line 16
def serializers
  @serializers ||= Readthis::Serializers.new
end

Private Instance Methods

fault_tolerant=(value) click to toggle source

Toggle fault tolerance for connection errors.

@param [Boolean] value The new value for fault tolerance

# File lib/readthis.rb, line 33
def fault_tolerant=(value)
  @fault_tolerant = value
end
fault_tolerant?() click to toggle source

Indicates whether connection error tolerance is enabled. With tolerance enabled every operation will return a `nil` value.

@return [Boolean] True for enabled, false for disabled

# File lib/readthis.rb, line 25
def fault_tolerant?
  @fault_tolerant
end
reset!() click to toggle source

@private

# File lib/readthis.rb, line 38
def reset!
  @fault_tolerant = nil
  @serializers = nil
end
serializers() click to toggle source

The current, global, instance of serializers that is used by all cache instances.

@return [Readthis::Serializers] An cached Serializers instance

@see readthis/serializers

# File lib/readthis.rb, line 16
def serializers
  @serializers ||= Readthis::Serializers.new
end