Websites/app/jobs/update_external_cache_job.rb

11 lines
218 B
Ruby

# frozen_string_literal: true
class UpdateExternalCacheJob < ApplicationJob
queue_as :cache
def perform(image)
return unless image.cache_expired? || image.cached_data.blank?
image.update_cache!
end
end