MCPcopy
hub / github.com/grafana/dskit / LRUCache

Struct LRUCache

cache/lru.go:17–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15var _ Cache = (*LRUCache)(nil)
16
17type LRUCache struct {
18 c Cache
19 logger log.Logger
20 defaultTTL time.Duration
21 name string
22
23 mtx sync.Mutex
24 lru *lru.LRU[string, *Item]
25
26 requests prometheus.Counter
27 hits prometheus.Counter
28 items prometheus.GaugeFunc
29}
30
31type Item struct {
32 Data []byte

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected