From 4e64f31079637cef173bbd5fc5b042ffc3b25802 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Thu, 22 Oct 2020 17:53:07 +0900 Subject: [PATCH] Document for cache store name instrumentation [ci skip] Follow up to #40425. --- .../source/active_support_instrumentation.md | 51 +++++++++++-------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/guides/source/active_support_instrumentation.md b/guides/source/active_support_instrumentation.md index fe1c3fc8dfde1..cdab046318d52 100644 --- a/guides/source/active_support_instrumentation.md +++ b/guides/source/active_support_instrumentation.md @@ -437,6 +437,7 @@ Active Support | Key | Value | | ------------------ | ------------------------------------------------- | | `:key` | Key used in the store | +| `:store` | Name of the store class | | `:hit` | If this read is a hit | | `:super_operation` | :fetch is added when a read is used with `#fetch` | @@ -444,15 +445,17 @@ Active Support This event is only used when `#fetch` is called with a block. -| Key | Value | -| ------ | --------------------- | -| `:key` | Key used in the store | +| Key | Value | +| -------- | ----------------------- | +| `:key` | Key used in the store | +| `:store` | Name of the store class | INFO. Options passed to fetch will be merged with the payload when writing to the store ```ruby { - key: 'name-of-complicated-computation' + key: "name-of-complicated-computation", + store: "ActiveSupport::Cache::MemCacheStore" } ``` @@ -461,53 +464,61 @@ INFO. Options passed to fetch will be merged with the payload when writing to th This event is only used when `#fetch` is called with a block. -| Key | Value | -| ------ | --------------------- | -| `:key` | Key used in the store | +| Key | Value | +| -------- | ----------------------- | +| `:key` | Key used in the store | +| `:store` | Name of the store class | INFO. Options passed to fetch will be merged with the payload. ```ruby { - key: 'name-of-complicated-computation' + key: "name-of-complicated-computation", + store: "ActiveSupport::Cache::MemCacheStore" } ``` ### cache_write.active_support -| Key | Value | -| ------ | --------------------- | -| `:key` | Key used in the store | +| Key | Value | +| -------- | ----------------------- | +| `:key` | Key used in the store | +| `:store` | Name of the store class | INFO. Cache stores may add their own keys ```ruby { - key: 'name-of-complicated-computation' + key: "name-of-complicated-computation", + store: "ActiveSupport::Cache::MemCacheStore" } ``` ### cache_delete.active_support -| Key | Value | -| ------ | --------------------- | -| `:key` | Key used in the store | +| Key | Value | +| -------- | ----------------------- | +| `:key` | Key used in the store | +| `:store` | Name of the store class | ```ruby { - key: 'name-of-complicated-computation' + key: "name-of-complicated-computation", + store: "ActiveSupport::Cache::MemCacheStore" } ``` ### cache_exist?.active_support -| Key | Value | -| ------ | --------------------- | -| `:key` | Key used in the store | +| Key | Value | +| -------- | ----------------------- | +| `:key` | Key used in the store | +| `:store` | Name of the store class | ```ruby { - key: 'name-of-complicated-computation' + key: "name-of-complicated-computation", + store: "ActiveSupport::Cache::MemCacheStore" } ```