Sha256: 5585aeb12487298742c85c4e63edf38bd2797b45b2cc2055fd0ba063c1cb2d95

Contents?: true

Size: 252 Bytes

Versions: 13

Compression:

Stored size: 252 Bytes

Contents

# frozen_string_literal: true

module Thermos
  class RebuildCacheJob < ActiveJob::Base
    def perform(key, id)
      beverage = BeverageStorage.instance.get_beverage(key)
      Rails.cache.write([key, id], beverage.action.call(id))
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
thermos-1.0.2 lib/thermos/rebuild_cache_job.rb
thermos-1.0.1 lib/thermos/rebuild_cache_job.rb
thermos-1.0.0 lib/thermos/rebuild_cache_job.rb
thermos-0.6.0 lib/thermos/rebuild_cache_job.rb
thermos-0.5.2 lib/thermos/rebuild_cache_job.rb
thermos-0.5.1 lib/thermos/rebuild_cache_job.rb
thermos-0.5.0 lib/thermos/rebuild_cache_job.rb
thermos-0.4.1 lib/thermos/rebuild_cache_job.rb
thermos-0.4.0 lib/thermos/rebuild_cache_job.rb
thermos-0.3.0 lib/thermos/rebuild_cache_job.rb
thermos-0.2.1 lib/thermos/rebuild_cache_job.rb
thermos-0.2.0 lib/thermos/rebuild_cache_job.rb
thermos-0.1.1 lib/thermos/rebuild_cache_job.rb