Sha256: 158cac4759436e78d396491e0066cd6e5ad641b2f6d7c409cceeae68aebbf087
Contents?: true
Size: 380 Bytes
Versions: 4
Compression:
Stored size: 380 Bytes
Contents
module CacheKeeper::CachedMethod::Refreshable def refresh(target) Rails.cache.fetch(cache_key(target), expires_in: expires_in) do target.send alias_for_original_method end end def refresh_later(target) CacheKeeper::RefreshJob.perform_later self, target end def autorefresh(target) return unless stale?(target) refresh_later target end end
Version data entries
4 entries across 4 versions & 1 rubygems