Fix: fakeip missing host
This commit is contained in:
9
common/cache/lrucache.go
vendored
9
common/cache/lrucache.go
vendored
@ -86,6 +86,15 @@ func (c *LruCache) Get(key interface{}) (interface{}, bool) {
|
||||
return value, true
|
||||
}
|
||||
|
||||
// Exist returns if key exist in cache but not put item to the head of linked list
|
||||
func (c *LruCache) Exist(key interface{}) bool {
|
||||
c.mu.Lock()
|
||||
defer c.mu.Unlock()
|
||||
|
||||
_, ok := c.cache[key]
|
||||
return ok
|
||||
}
|
||||
|
||||
// Set stores the interface{} representation of a response for a given key.
|
||||
func (c *LruCache) Set(key interface{}, value interface{}) {
|
||||
c.mu.Lock()
|
||||
|
Reference in New Issue
Block a user