Update godeps
This commit is contained in:
parent
a965f44f84
commit
73e22a50d2
453 changed files with 84778 additions and 70308 deletions
6
vendor/k8s.io/kubernetes/pkg/util/cache/lruexpirecache.go
generated
vendored
6
vendor/k8s.io/kubernetes/pkg/util/cache/lruexpirecache.go
generated
vendored
|
|
@ -25,7 +25,7 @@ import (
|
|||
|
||||
type LRUExpireCache struct {
|
||||
cache *lru.Cache
|
||||
lock sync.RWMutex
|
||||
lock sync.Mutex
|
||||
}
|
||||
|
||||
func NewLRUExpireCache(maxSize int) *LRUExpireCache {
|
||||
|
|
@ -46,8 +46,8 @@ func (c *LRUExpireCache) Add(key lru.Key, value interface{}, ttl time.Duration)
|
|||
}
|
||||
|
||||
func (c *LRUExpireCache) Get(key lru.Key) (interface{}, bool) {
|
||||
c.lock.RLock()
|
||||
defer c.lock.RUnlock()
|
||||
c.lock.Lock()
|
||||
defer c.lock.Unlock()
|
||||
e, ok := c.cache.Get(key)
|
||||
if !ok {
|
||||
return nil, false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue