MCPcopy Create free account
hub / github.com/bricks-cloud/BricksLLM / Set

Method Set

internal/storage/redis/key-cache.go:26–35  ·  view source on GitHub ↗
(pid string, value any, ttl time.Duration)

Source from the content-addressed store, hash-verified

24}
25
26func (c *KeysCache) Set(pid string, value any, ttl time.Duration) error {
27 ctx, cancel := context.WithTimeout(context.Background(), c.wt)
28 defer cancel()
29 err := c.client.Set(ctx, pid, value, ttl).Err()
30 if err != nil {
31 return err
32 }
33
34 return nil
35}
36
37func (c *KeysCache) Delete(pid string) error {
38 ctx, cancel := context.WithTimeout(context.Background(), c.wt)

Callers

nothing calls this directly

Calls 1

SetMethod · 0.65

Tested by

no test coverage detected