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

Method Set

internal/storage/redis/cache.go:27–36  ·  view source on GitHub ↗
(key string, value interface{}, ttl time.Duration)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

SetMethod · 0.65

Tested by

no test coverage detected