(key any)
| 39 | } |
| 40 | |
| 41 | func (c *TimeoutCache) getForTesting(key any) (*cacheEntry, bool) { |
| 42 | c.mu.Lock() |
| 43 | defer c.mu.Unlock() |
| 44 | r, ok := c.cache[key] |
| 45 | return r, ok |
| 46 | } |
| 47 | |
| 48 | // TestCacheExpire attempts to add an entry to the cache and verifies that it |
| 49 | // was added successfully. It then makes sure that on timeout, it's removed and |
no test coverage detected