Module: Dalli

Defined in:
lib/dalli.rb,
lib/dalli/ring.rb,
lib/dalli/client.rb,
lib/dalli/server.rb,
lib/dalli/socket.rb,
lib/dalli/options.rb,
lib/dalli/version.rb,
lib/dalli/protocol.rb,
lib/dalli/pid_cache.rb,
lib/dalli/compressor.rb,
lib/dalli/key_manager.rb,
lib/dalli/protocol/base.rb,
lib/dalli/protocol/meta.rb,
lib/dalli/protocol/binary.rb,
lib/dalli/pipelined_getter.rb,
lib/dalli/protocol/ttl_sanitizer.rb,
lib/dalli/servers_arg_normalizer.rb,
lib/dalli/protocol/response_buffer.rb,
lib/dalli/protocol/value_compressor.rb,
lib/dalli/protocol/value_marshaller.rb,
lib/dalli/protocol/value_serializer.rb,
lib/dalli/protocol/connection_manager.rb,
lib/dalli/protocol/meta/key_regularizer.rb,
lib/dalli/protocol/server_config_parser.rb,
lib/dalli/protocol/binary/response_header.rb,
lib/dalli/protocol/meta/request_formatter.rb,
lib/dalli/protocol/meta/response_processor.rb,
lib/dalli/protocol/binary/request_formatter.rb,
lib/dalli/protocol/binary/response_processor.rb,
lib/dalli/protocol/binary/sasl_authentication.rb

Overview

rubocop:disable Style/Documentation

Defined Under Namespace

Modules: PIDCache, Protocol, ServersArgNormalizer, Socket, Threadsafe Classes: Client, Compressor, DalliError, GzipCompressor, KeyManager, MarshalError, NetworkError, NilObject, NotPermittedMultiOpError, PipelinedGetter, Ring, RingError, UnmarshalError, ValueOverMaxSize

Constant Summary collapse

NOT_FOUND =

rubocop:disable Lint/EmptyClass

NilObject.new
QUIET =
:dalli_multi
Server =
Protocol::Binary
VERSION =
'3.2.8'
MIN_SUPPORTED_MEMCACHED_VERSION =
'1.4'

Class Method Summary collapse

Class Method Details

.default_loggerObject



45
46
47
48
49
50
# File 'lib/dalli.rb', line 45

def self.default_logger
  require 'logger'
  l = Logger.new($stdout)
  l.level = Logger::INFO
  l
end

.loggerObject



36
37
38
# File 'lib/dalli.rb', line 36

def self.logger
  @logger ||= rails_logger || default_logger
end

.logger=(logger) ⇒ Object



52
53
54
# File 'lib/dalli.rb', line 52

def self.logger=(logger)
  @logger = logger
end

.rails_loggerObject



40
41
42
43
# File 'lib/dalli.rb', line 40

def self.rails_logger
  (defined?(Rails) && Rails.respond_to?(:logger) && Rails.logger) ||
    (defined?(RAILS_DEFAULT_LOGGER) && RAILS_DEFAULT_LOGGER.respond_to?(:debug) && RAILS_DEFAULT_LOGGER)
end