1 package ttlcache 2 3 // Metrics contains common cache metrics calculated over the course 4 // of the cache's lifetime. 5 type Metrics struct { 6 // Insertions specifies how many items were inserted. 7 Insertions uint64 8 9 // Hits specifies how many items were successfully retrieved 10 // from the cache. 11 // Retrievals made with a loader function are not tracked. 12 Hits uint64 13 14 // Misses specifies how many items were not found in the cache. 15 // Retrievals made with a loader function are considered misses as 16 // well. 17 Misses uint64 18 19 // Evictions specifies how many items were removed from the 20 // cache. 21 Evictions uint64 22 } 23