You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

8 lines
230 B

  1. # frozen_string_literal: true
  2. class WarmCacheService < BaseService
  3. def call(cacheable)
  4. full_item = cacheable.class.where(id: cacheable.id).with_includes.first
  5. Rails.cache.write(cacheable.cache_key, full_item)
  6. end
  7. end