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

Struct Versioned

cache/versioned.go:17–21  ·  view source on GitHub ↗

Versioned cache adds a version prefix to the keys. This allows cache keys to be changed in a newer version of the code (after a bugfix or a cached data format change).

Source from the content-addressed store, hash-verified

15// Versioned cache adds a version prefix to the keys.
16// This allows cache keys to be changed in a newer version of the code (after a bugfix or a cached data format change).
17type Versioned struct {
18 cache Cache
19 logger log.Logger
20 versionPrefix string
21}
22
23// NewVersioned creates a new Versioned cache.
24func NewVersioned(c Cache, version uint, logger log.Logger) *Versioned {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected