MCPcopy Create free account
hub / github.com/conforma/cli / WithPolicyCache

Function WithPolicyCache

internal/policy/cache/cache.go:92–94  ·  view source on GitHub ↗

WithPolicyCache returns a new context with the provided PolicyCache added.

(ctx context.Context, cache *PolicyCache)

Source from the content-addressed store, hash-verified

90
91// WithPolicyCache returns a new context with the provided PolicyCache added.
92func WithPolicyCache(ctx context.Context, cache *PolicyCache) context.Context {
93 return context.WithValue(ctx, policyCacheKey, cache)
94}

Callers 3

TestNewPolicyCacheFunction · 0.85
TestWithPolicyCacheFunction · 0.85

Calls

no outgoing calls

Tested by 3

TestNewPolicyCacheFunction · 0.68
TestWithPolicyCacheFunction · 0.68