Method: Firebolt::Cache#write

Defined in:
lib/firebolt/cache.rb

#write(key_suffix, value, options = {}) ⇒ Object



34
35
36
37
38
39
40
# File 'lib/firebolt/cache.rb', line 34

def write(key_suffix, value, options = {})
  salted_key = cache_key_with_salt(key_suffix, salt)
  return nil if salted_key.nil?

  options.merge!(:expires_in => ::Firebolt.config.warming_frequency + 1.hour)
  ::Firebolt.config.cache.write(salted_key, value, options)
end