MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / newClaimsCache

Function newClaimsCache

app/controlplane/cmd/wire.go:149–154  ·  view source on GitHub ↗
(logger log.Logger)

Source from the content-addressed store, hash-verified

147)
148
149func newClaimsCache(logger log.Logger) (cache.Cache[*jwt.MapClaims], error) {
150 l := log.NewHelper(logger)
151 opts := []cache.Option{cache.WithTTL(10 * time.Second), cache.WithLogger(l), cache.WithDescription("Cache for JWT claims")}
152 l.Infow("msg", "cache initialized", "backend", "memory", "ttl", "10s")
153 return cache.New[*jwt.MapClaims](opts...)
154}
155
156func newMembershipsCache(logger log.Logger) (cache.Cache[*entities.Membership], error) {
157 l := log.NewHelper(logger)

Callers

nothing calls this directly

Calls 5

WithTTLFunction · 0.92
WithLoggerFunction · 0.92
WithDescriptionFunction · 0.92
NewFunction · 0.92
InfowMethod · 0.65

Tested by

no test coverage detected