debian-mirror-gitlab/app/models/concerns/reactive_service.rb
2021-01-03 14:25:43 +05:30

13 lines
348 B
Ruby

# frozen_string_literal: true
module ReactiveService
extend ActiveSupport::Concern
included do
include ReactiveCaching
# Default cache key: class name + project_id
self.reactive_cache_key = ->(service) { [service.class.model_name.singular, service.project_id] }
self.reactive_cache_work_type = :external_dependency
end
end