Feature: flush fakeip pool

This commit is contained in:
yaling888
2022-03-23 01:05:43 +08:00
parent f4312cfa5a
commit ef915c94dc
12 changed files with 137 additions and 2 deletions

View File

@ -216,6 +216,15 @@ func (c *LruCache) deleteElement(le *list.Element) {
}
}
func (c *LruCache) Clear() error {
c.mu.Lock()
c.cache = make(map[any]*list.Element)
c.mu.Unlock()
return nil
}
type entry struct {
key any
value any