Cache byte arrays by key. NB we intentionally do not return errors in this interface - caching is best effort by definition. We found that when these methods did return errors, the caller would just log them - so its easier for implementation to do that. Whatsmore, we found partially successful Fe
| 18 | // Whatsmore, we found partially successful Fetches were often treated as failed |
| 19 | // when they returned an error. |
| 20 | type Cache interface { |
| 21 | Store(ctx context.Context, key []string, buf [][]byte) |
| 22 | Fetch(ctx context.Context, keys []string) (found []string, bufs [][]byte, missing []string) |
| 23 | Stop() |
| 24 | } |
| 25 | |
| 26 | // Config for building Caches. |
| 27 | type Config struct { |
no outgoing calls
no test coverage detected