MCPcopy
hub / github.com/uselotus/lotus / Get

Method Get

go/event-ingestion/cache/cache.go:24–35  ·  view source on GitHub ↗
(key string)

Source from the content-addressed store, hash-verified

22var ctx = context.Background()
23
24func (c *RedisCache) Get(key string) (string, error) {
25 val, err := c.rdb.Get(ctx, key).Result()
26 if err == redis.Nil {
27 return "", nil
28 }
29
30 if err != nil {
31 return "", err
32 }
33
34 return val, nil
35}
36
37func (c *RedisCache) Set(key string, value interface{}, expiration *time.Duration) error {
38 var realExpiration time.Duration

Callers

nothing calls this directly

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected