1 # wikimedia/objectcache
5 Sent to StatsD under MediaWiki's namespace.
9 The default WANObjectCache provided by MediaWikiServices disables these
10 statistics in entry points where MW_ENTRY_POINT is 'cli'.
12 #### `wanobjectcache.{kClass}.{cache_action_and_result}`
14 Upon cache access via `WANObjectCache::getWithSetCallback()`, this measures the total time spent
15 in this method from start to end for all cases, except process-cache hits.
17 See also `wanobjectcache.{kClass}.regen_walltime`, which, during misses/renews, measures just the
18 portion of time spent in the callback to regenerate the value.
20 * Type: Measure (in milliseconds).
21 * Variable `kClass`: The first part of your cache key.
22 * Variable `result`: One of:
23 * `"hit.good"`: A non-expired value was returned (and call did not get chosen
24 for pre-emptive refresh).
25 * `"hit.refresh"`: A non-expired value was returned (and call was chosen for
26 a pre-emptive refresh, and an async refresh was scheduled).
27 * `"hit.volatile"`: A value was found that was generated and stored less than 0.1s ago,
28 and returned as-is despite appearing to also be expired already. This amount of time is
29 considered negligible in terms of clock accuracy, and by random chance we usually decide
30 to treat these as a cache hit (see `RECENT_SET_HIGH_MS`).
31 * `"hit.stale"`: An expired value was found, but we are within the allowed stale period
32 specified by a `lockTSE` option, and the current request did not get the regeneration lock.
33 The stale value is returned as-is.
34 * `"miss.compute"`: A new value was computed by the callback and returned.
35 No non-expired value was found, and if this key needed a regeneration lock, we got the lock.
36 * `"miss.busy"`: A busy value was produced by a `busyValue` callback and returned.
37 No non-expired value was found, and we tried to use a regeneration lock (per the `busyValue`
38 option), but the current request did not get the lock.
39 * `"renew.compute"`: Artificial demand from an async refresh, led to a new value being
40 computed by the callback. These are like `"miss.compute"`, but in response to `"hit.refresh"`.
41 * `"renew.busy"`: Artificial demand from an async refresh failed to produce a value.
42 The key used the `busyValue` option, and could not get a regeneration lock.
44 #### `wanobjectcache.{kClass}.regen_walltime`
46 Upon cache update due to a cache miss or async refresh, this measures the time spent in
47 the regeneration callback when computing a new value.
49 * Type: Measure (in milliseconds).
50 * Variable `kClass`: The first part of your cache key.
52 #### `wanobjectcache.{kClass}.ck_touch.{result}`
54 Call counter from `WANObjectCache::touchCheckKey()`.
57 * Variable `kClass`: The first part of your cache key.
58 * Variable `result`: One of `"ok"` or `"error"`.
60 #### `wanobjectcache.{kClass}.ck_reset.{result}`
62 Call counter from `WANObjectCache::resetCheckKey()`.
65 * Variable `kClass`: The first part of your cache key.
66 * Variable `result`: One of `"ok"` or `"error"`.
68 #### `wanobjectcache.{kClass}.delete.{result}`
70 Call counter from `WANObjectCache::delete()`.
73 * Variable `kClass`: The first part of your cache key.
74 * Variable `result`: One of `"ok"` or `"error"`.