MCPcopy Create free account
hub / github.com/cortexproject/cortex / cachedScanner

Struct cachedScanner

pkg/util/users/cache.go:13–24  ·  view source on GitHub ↗

cachedScanner is a scanner that caches the result of the underlying scanner.

Source from the content-addressed store, hash-verified

11
12// cachedScanner is a scanner that caches the result of the underlying scanner.
13type cachedScanner struct {
14 scanner Scanner
15
16 mtx sync.RWMutex
17 lastUpdatedAt time.Time
18 ttl time.Duration
19
20 active, deleting, deleted []string
21
22 requests prometheus.Counter
23 hits prometheus.Counter
24}
25
26func newCachedScanner(scanner Scanner, cfg UsersScannerConfig, reg prometheus.Registerer) *cachedScanner {
27 return &cachedScanner{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected