MCPcopy Create free account
hub / github.com/SenseUnit/dumbproxy / Get

Method Get

certcache/redis.go:30–39  ·  view source on GitHub ↗
(ctx context.Context, key string)

Source from the content-addressed store, hash-verified

28}
29
30func (r *RedisCache) Get(ctx context.Context, key string) ([]byte, error) {
31 res, err := r.r.Get(ctx, r.pfx+key).Bytes()
32 if err != nil {
33 if err == redis.Nil {
34 return nil, autocert.ErrCacheMiss
35 }
36 return nil, err
37 }
38 return res, nil
39}
40
41func (r *RedisCache) Put(ctx context.Context, key string, data []byte) error {
42 return r.r.Set(ctx, r.pfx+key, data, 0).Err()

Callers 15

getRatelimitersMethod · 0.45
NewJSLimitProviderFunction · 0.45
NewRedisAuthFunction · 0.45
ValidMethod · 0.45
ValidateMethod · 0.45
NewBasicFileAuthFunction · 0.45
ValidateMethod · 0.45
NewTLSCookieAuthFunction · 0.45
NewStaticResponseFunction · 0.45
NewHMACAuthFunction · 0.45
ValidateMethod · 0.45
NewStaticAuthFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected