MCPcopy
hub / github.com/crowdsecurity/crowdsec / SetInStash

Function SetInStash

pkg/exprhelpers/helpers.go:894–901  ·  view source on GitHub ↗

func SetInStash(cacheName string, key string, value string, expiration *time.Duration) any {

(params ...any)

Source from the content-addressed store, hash-verified

892
893// func SetInStash(cacheName string, key string, value string, expiration *time.Duration) any {
894func SetInStash(params ...any) (any, error) {
895 cacheName := params[0].(string)
896 key := params[1].(string)
897 value := params[2].(string)
898 expiration := params[3].(*time.Duration)
899
900 return cache.SetKey(cacheName, key, value, expiration), nil
901}
902
903func Sprintf(params ...any) (any, error) {
904 format := params[0].(string)

Callers

nothing calls this directly

Calls 1

SetKeyFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…