diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-10 18:08:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-10 18:08:54 +0300 |
commit | 11e5d1b9ca3efa7be34ddebb708a6aedb4e91639 (patch) | |
tree | 999fdffb9d3db2e5200994e289e50fa3a3a1684a /doc/development/reactive_caching.md | |
parent | 7351a484d79236b7e9d47c86f2fcc970b7ae10b0 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/development/reactive_caching.md')
-rw-r--r-- | doc/development/reactive_caching.md | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/development/reactive_caching.md b/doc/development/reactive_caching.md index de93a5aa1d0..94058a3c09c 100644 --- a/doc/development/reactive_caching.md +++ b/doc/development/reactive_caching.md @@ -48,6 +48,12 @@ of the cache by the `reactive_cache_lifetime` value. Once the lifetime has expired, no more background jobs will be enqueued and calling `#with_reactive_cache` will again return `nil` - starting the process all over again. +### 1 MB hard limit + +`ReactiveCaching` has a 1 megabyte default limit. [This value is configurable](#selfreactive_cache_worker_finder). + +If the data we're trying to cache has over 1 megabyte, it will not be cached and a handled `ReactiveCaching::ExceededReactiveCacheLimit` will be notified on Sentry. + ## When to use - If we need to make a request to an external API (for example, requests to the k8s API). @@ -228,6 +234,16 @@ be reset to `reactive_cache_lifetime`. self.reactive_cache_lifetime = 10.minutes ``` +#### `self.reactive_cache_hard_limit` + +- This is the maximum data size that `ReactiveCaching` allows to be cached. +- The default is 1 megabyte. Data that goes over this value will not be cached +and will silently raise `ReactiveCaching::ExceededReactiveCacheLimit` on Sentry. + +```ruby +self.reactive_cache_hard_limit = 5.megabytes +``` + #### `self.reactive_cache_worker_finder` - This is the method used by the background worker to find or generate the object on |