SetMultiAsync implements Cache.
(data map[string][]byte, ttl time.Duration)
| 76 | |
| 77 | // SetMultiAsync implements Cache. |
| 78 | func (s *SnappyCache) SetMultiAsync(data map[string][]byte, ttl time.Duration) { |
| 79 | encoded := make(map[string][]byte, len(data)) |
| 80 | for key, value := range data { |
| 81 | encoded[key] = snappy.Encode(nil, value) |
| 82 | } |
| 83 | |
| 84 | s.next.SetMultiAsync(encoded, ttl) |
| 85 | } |
| 86 | |
| 87 | func (s *SnappyCache) Set(ctx context.Context, key string, value []byte, ttl time.Duration) error { |
| 88 | return s.next.Set(ctx, key, snappy.Encode(nil, value), ttl) |
nothing calls this directly
no test coverage detected