Method: AnyCache::Adapters::Redis#read

Defined in:
lib/any_cache/adapters/redis.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



69
70
71
72
73
74
# File 'lib/any_cache/adapters/redis.rb', line 69

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

  raw ? value : detransform_value(value)
end