Skip to content

Commit

Permalink
Merge pull request rails#40431 from kamipo/document-cache-instrument-…
Browse files Browse the repository at this point in the history
…store

Document for cache store name instrumentation [ci skip]
  • Loading branch information
kamipo committed Oct 22, 2020
2 parents 09f364b + 4e64f31 commit 8d96647
Showing 1 changed file with 31 additions and 20 deletions.
51 changes: 31 additions & 20 deletions guides/source/active_support_instrumentation.md
Expand Up @@ -437,22 +437,25 @@ 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` |

### cache_generate.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"
}
```

Expand All @@ -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"
}
```

Expand Down

0 comments on commit 8d96647

Please sign in to comment.