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

Method GetBytes

internal/storage/redis/cache.go:49–60  ·  view source on GitHub ↗
(key string)

Source from the content-addressed store, hash-verified

47}
48
49func (c *Cache) GetBytes(key string) ([]byte, error) {
50 ctx, cancel := context.WithTimeout(context.Background(), c.rt)
51 defer cancel()
52
53 result := c.client.Get(ctx, key)
54 err := result.Err()
55 if err != nil {
56 return nil, err
57 }
58
59 return result.Bytes()
60}
61
62func (c *Cache) IncrementCounter(keyId string, timeUnit key.TimeUnit, incr int64) error {
63 ctxTimeout, cancel := context.WithTimeout(context.Background(), c.wt)

Callers

nothing calls this directly

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected