Global tags
cache=<name>-
The cache name.
Global tags
cache=<name>The cache name.
Monitor the number of entries in your local cache.
| Metric | Description |
|---|---|
|
The number of cached entries. |
The following metrics monitor the cache accesses, such as lookup and evictions.
Tags
result=hit|missThe result of the read/lookup operation.
If the value is hit, the entry was found in the cache.
The read requests can be monitored using a single metric.
| Metric | Description |
|---|---|
|
The total number of cache lookups. |
Hit Ratio for read operation
An expression can be used to compute the hit ratio for a cache in systems such as Prometheus. For example, the hit ratio for read operations can be expressed as:
cache_gets_total{result="hit"} / cache_gets_total