parent
6fa4e01139
commit
19b9e1e2c3
@ -0,0 +1,8 @@ |
|||||||
|
# frozen_string_literal: true |
||||||
|
|
||||||
|
class WarmCacheService < BaseService |
||||||
|
def call(cacheable) |
||||||
|
full_item = cacheable.class.where(id: cacheable.id).with_includes.first |
||||||
|
Rails.cache.write(cacheable.cache_key, full_item) |
||||||
|
end |
||||||
|
end |
Loading…
Reference in new issue