Method: AnyCache::Adapters::Dalli#read

Defined in:
lib/any_cache/adapters/dalli.rb

#read(key, **options) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • key (String)
  • raw (Hash)

    a customizable set of options

Returns:

  • (Object)

Since:

  • 0.1.0



65
66
67
68
69
70
# File 'lib/any_cache/adapters/dalli.rb', line 65

def read(key, **options)
  raw = options.fetch(:raw, false)
  value = get(key)

  raw ? value : detransform_value(value)
end