Flush removes all entries from the cache
()
| 116 | |
| 117 | // Flush removes all entries from the cache |
| 118 | func (m *MockCache) Flush() { |
| 119 | m.mu.Lock() |
| 120 | defer m.mu.Unlock() |
| 121 | |
| 122 | m.cache = map[string]Item{} |
| 123 | } |
| 124 | |
| 125 | // Advance changes "now" by the given duration |
| 126 | func (m *MockCache) Advance(d time.Duration) { |