[SKIP CI]
Merge remote-tracking branch 'Pro-Plus/with-tun' into Alpha # Conflicts: # README.md # hub/route/server.go
This commit is contained in:
9
common/cache/lrucache.go
vendored
9
common/cache/lrucache.go
vendored
@ -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
|
||||
|
Reference in New Issue
Block a user