(ctx context.Context, values map[K]V)
| 206 | } |
| 207 | |
| 208 | func (c *cache[K, V]) SetMany(ctx context.Context, values map[K]V) { |
| 209 | now := c.clock.Now() |
| 210 | |
| 211 | for key, value := range values { |
| 212 | c.otter.Set(key, swrEntry[V]{ |
| 213 | Value: value, |
| 214 | Fresh: now.Add(c.fresh), |
| 215 | Stale: now.Add(c.stale), |
| 216 | Hit: Hit, |
| 217 | }) |
| 218 | } |
| 219 | } |
| 220 | |
| 221 | func (c *cache[K, V]) get(_ context.Context, key K) (swrEntry[V], bool) { |
| 222 | v, ok := c.otter.Get(key) |
no test coverage detected