debian-mirror-gitlab/app/models/concerns/integrations/reactively_cached.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
405 B
Ruby
Raw Normal View History

2021-12-11 22:18:48 +05:30
# frozen_string_literal: true
module Integrations
module ReactivelyCached
extend ActiveSupport::Concern
included do
include ::ReactiveCaching
# Default cache key: class name + project_id
self.reactive_cache_key = ->(integration) { [integration.class.model_name.singular, integration.project_id] }
self.reactive_cache_work_type = :external_dependency
end
end
end