Welcome to mirror list, hosted at ThFree Co, Russian Federation.

reactively_cached.rb « integrations « concerns « models « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 62eff06c8e2a18c8d7b648f5a69c46a3eb8281a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 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