(key string, value T, exp Expirable)
| 29 | } |
| 30 | |
| 31 | func (c *KeyedCache[T]) SetWithExpirable(key string, value T, exp Expirable) { |
| 32 | c.mu.Lock() |
| 33 | defer c.mu.Unlock() |
| 34 | |
| 35 | c.entries[key] = &CacheEntry[T]{ |
| 36 | data: value, |
| 37 | Expirable: exp, |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | func (c *KeyedCache[T]) Get(key string) (T, bool) { |
| 42 | c.mu.RLock() |
no test coverage detected