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

Method Get

pkg/cache/memory.go:41–45  ·  view source on GitHub ↗
(_ context.Context, key string)

Source from the content-addressed store, hash-verified

39}
40
41func (m *memoryCache[T]) Get(_ context.Context, key string) (T, bool, error) {
42 val, ok := m.lru.Get(key)
43 m.logger.Debugw("msg", "cache get", "key", key, "hit", ok, "backend", "memory")
44 return val, ok, nil
45}
46
47func (m *memoryCache[T]) Set(_ context.Context, key string, value T) error {
48 m.lru.Add(key, value)

Callers

nothing calls this directly

Calls 2

GetMethod · 0.65
DebugwMethod · 0.65

Tested by

no test coverage detected