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

Method Set

internal/policy/cache/cache.go:64–70  ·  view source on GitHub ↗

Set manually sets the value for a given key in the cache. It overwrites any existing value and error.

(key string, value string, err error)

Source from the content-addressed store, hash-verified

62// Set manually sets the value for a given key in the cache.
63// It overwrites any existing value and error.
64func (c *PolicyCache) Set(key string, value string, err error) {
65 entry := &cacheEntry{
66 value: value,
67 err: err,
68 }
69 c.Data.Store(key, entry)
70}
71
72// NewPolicyCache creates and returns a new PolicyCache instance.
73func NewPolicyCache(ctx context.Context) *PolicyCache {

Callers 4

PreProcessPolicyFunction · 0.95
TestSetFunction · 0.95
TestGet_ConcurrentAccessFunction · 0.95
TestGetFunction · 0.45

Calls

no outgoing calls

Tested by 3

TestSetFunction · 0.76
TestGet_ConcurrentAccessFunction · 0.76
TestGetFunction · 0.36