I discovered that Spring Boot using Caffeine module is already providing those:
Metrics Exposed by Spring Boot Caffeine
But then, you have to make use of tags to navigate to find what you need:
For example: http://localhost:8090/metrics/cache.gets?tag=cache:bank_codes_cache
Gets as Response:
{
"name": "cache.gets",
"description": "The number of times cache lookup methods have returned a cached (hit) or uncached (newly loaded or null) value (miss).",
"measurements": [
{
"statistic": "COUNT",
"value": 0.0
}
],
"availableTags": [
{
"tag": "cache.manager",
"values": [
"cacheManager"
]
},
{
"tag": "result",
"values": [
"hit",
"miss"
]
},
{
"tag": "name",
"values": [
"bank_codes_cache"
]
}
]
}