1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actiontext/lib/action_text/attachments/caching.rb
2019-01-04 22:22:49 -05:00

16 lines
322 B
Ruby

# frozen_string_literal: true
module ActionText
module Attachments
module Caching
def cache_key(*args)
[self.class.name, cache_digest, *attachable.cache_key(*args)].join("/")
end
private
def cache_digest
Digest::SHA256.hexdigest(node.to_s)
end
end
end
end