diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
commit | e8d2c2579383897a1dd7f9debd359abe8ae8373d (patch) | |
tree | c42be41678c2586d49a75cabce89322082698334 /doc/development/reactive_caching.md | |
parent | fc845b37ec3a90aaa719975f607740c22ba6a113 (diff) |
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'doc/development/reactive_caching.md')
-rw-r--r-- | doc/development/reactive_caching.md | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/doc/development/reactive_caching.md b/doc/development/reactive_caching.md index b6878ee48f1..3c0a1419604 100644 --- a/doc/development/reactive_caching.md +++ b/doc/development/reactive_caching.md @@ -72,27 +72,27 @@ For more information, read the internal issue ## How to use -### In models and services +### In models and integrations -The ReactiveCaching concern can be used in models as well as `project_services` -(`app/models/project_services`). +The ReactiveCaching concern can be used in models as well as `integrations` +(`app/models/integrations`). -1. Include the concern in your model or service. +1. Include the concern in your model or integration. - When including in a model: + To include the concern in a model: ```ruby include ReactiveCaching ``` - or when including in a `project_service`: + To include the concern in an integration: ```ruby include ReactiveService ``` -1. Implement the `calculate_reactive_cache` method in your model/service. -1. Call `with_reactive_cache` in your model/service where the cached value is needed. +1. Implement the `calculate_reactive_cache` method in your model or integration. +1. Call `with_reactive_cache` in your model or integration where the cached value is needed. 1. Set the [`reactive_cache_work_type` accordingly](#selfreactive_cache_work_type). ### In controllers @@ -258,7 +258,7 @@ self.reactive_cache_hard_limit = 5.megabytes - This is the type of work performed by the `calculate_reactive_cache` method. Based on this attribute, it's able to pick the right worker to process the caching job. Make sure to set it as `:external_dependency` if the work performs any external request -(e.g. Kubernetes, Sentry); otherwise set it to `:no_dependency`. +(for example, Kubernetes, Sentry); otherwise set it to `:no_dependency`. #### `self.reactive_cache_worker_finder` |