MCPcopy
hub / github.com/1Panel-dev/KubePi / Add

Method Add

thirdparty/gotty/cache/token/redis.go:47–53  ·  view source on GitHub ↗

Add token to redis

(token string, param *TtyParameter, d time.Duration)

Source from the content-addressed store, hash-verified

45
46//Add token to redis
47func (r *RedisCache) Add(token string, param *TtyParameter, d time.Duration) error {
48 b, err := json.Marshal(param)
49 if err != nil {
50 return err
51 }
52 return r.client.Set(context.Background(), r.prefix+token, string(b), d).Err()
53}

Callers

nothing calls this directly

Calls 1

SetMethod · 0.45

Tested by

no test coverage detected