| 39 | ) |
| 40 | |
| 41 | type InMemoryIndexCache struct { |
| 42 | mtx sync.Mutex |
| 43 | |
| 44 | logger log.Logger |
| 45 | lru *lru.LRU[CacheKey, []byte] |
| 46 | maxSizeBytes uint64 |
| 47 | maxItemSizeBytes uint64 |
| 48 | |
| 49 | curSize uint64 |
| 50 | |
| 51 | evicted *prometheus.CounterVec |
| 52 | added *prometheus.CounterVec |
| 53 | current *prometheus.GaugeVec |
| 54 | currentSize *prometheus.GaugeVec |
| 55 | totalCurrentSize *prometheus.GaugeVec |
| 56 | overflow *prometheus.CounterVec |
| 57 | |
| 58 | commonMetrics *CommonMetrics |
| 59 | } |
| 60 | |
| 61 | // InMemoryIndexCacheConfig holds the in-memory index cache config. |
| 62 | type InMemoryIndexCacheConfig struct { |
nothing calls this directly
no outgoing calls
no test coverage detected