2018-08-03 13:22:24 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-01-12 17:31:02 -05:00
|
|
|
module ReactiveService
|
|
|
|
extend ActiveSupport::Concern
|
|
|
|
|
|
|
|
included do
|
|
|
|
include ReactiveCaching
|
|
|
|
|
|
|
|
# Default cache key: class name + project_id
|
2017-02-21 18:33:53 -05:00
|
|
|
self.reactive_cache_key = ->(service) { [service.class.model_name.singular, service.project_id] }
|
2017-01-12 17:31:02 -05:00
|
|
|
end
|
|
|
|
end
|