eko / gocache

☔️ A complete Go cache library that brings you multiple ways of managing your caches
https://vincent.composieux.fr/article/i-wrote-gocache-a-complete-and-extensible-go-cache-library/
MIT License
2.4k stars 193 forks source link

Initialize metrics on MetricCache creation #223

Closed ThisIsAreku closed 11 months ago

ThisIsAreku commented 11 months ago

metrics are not initialized when creating a new MetricCache, so they don't appear in prometheus until the first Get call

I've updated the test cases to reflect on this change

eko commented 11 months ago

Thank you @ThisIsAreku