Module: Stockpile::CachedValueExpirer

Defined in:
lib/stockpile/cached_value_expirer.rb

Overview

Stockpile::CachedValueExpirer

Service class to wrap expiration of of cached value

Class Method Summary collapse

Class Method Details

.expire_cached(db: :default, key:) ⇒ Object



24
25
26
# File 'lib/stockpile/cached_value_expirer.rb', line 24

def expire_cached(db: :default, key:)
  Stockpile.redis(db: db) { |r| r.expire(key, 0) }
end