Method: Faulty::Cache::Default#write

Defined in:
lib/faulty/cache/default.rb

#write(key, value, expires_in: expires_in) ⇒ void

This method returns an undefined value.

Write a value to the cache

This may be any object. It's up to the cache implementation to serialize if necessary or raise an error if unsupported.

Parameters:

  • key (String)

    The cache key

  • expires_in (Integer, nil) (defaults to: expires_in)

    The number of seconds until this cache entry expires. If nil, no expiration is set.

  • value (Object)

    The value to write to the cache

Raises:

  • If the cache backend encounters a failure



34
# File 'lib/faulty/cache/default.rb', line 34

def_delegators :@cache, :read, :write, :fault_tolerant?