mirror of
https://github.com/status-im/consul.git
synced 2025-01-10 22:06:20 +00:00
Updates hashicorp/golang-lru.
This commit is contained in:
parent
2ae0c1490e
commit
1eca282bee
23
vendor/github.com/hashicorp/golang-lru/.gitignore
generated
vendored
23
vendor/github.com/hashicorp/golang-lru/.gitignore
generated
vendored
@ -1,23 +0,0 @@
|
|||||||
# Compiled Object files, Static and Dynamic libs (Shared Objects)
|
|
||||||
*.o
|
|
||||||
*.a
|
|
||||||
*.so
|
|
||||||
|
|
||||||
# Folders
|
|
||||||
_obj
|
|
||||||
_test
|
|
||||||
|
|
||||||
# Architecture specific extensions/prefixes
|
|
||||||
*.[568vq]
|
|
||||||
[568vq].out
|
|
||||||
|
|
||||||
*.cgo1.go
|
|
||||||
*.cgo2.c
|
|
||||||
_cgo_defun.c
|
|
||||||
_cgo_gotypes.go
|
|
||||||
_cgo_export.*
|
|
||||||
|
|
||||||
_testmain.go
|
|
||||||
|
|
||||||
*.exe
|
|
||||||
*.test
|
|
2
vendor/github.com/hashicorp/golang-lru/2q.go
generated
vendored
2
vendor/github.com/hashicorp/golang-lru/2q.go
generated
vendored
@ -20,7 +20,7 @@ const (
|
|||||||
// TwoQueueCache is a thread-safe fixed size 2Q cache.
|
// TwoQueueCache is a thread-safe fixed size 2Q cache.
|
||||||
// 2Q is an enhancement over the standard LRU cache
|
// 2Q is an enhancement over the standard LRU cache
|
||||||
// in that it tracks both frequently and recently used
|
// in that it tracks both frequently and recently used
|
||||||
// entries seperately. This avoids a burst in access to new
|
// entries separately. This avoids a burst in access to new
|
||||||
// entries from evicting frequently used entries. It adds some
|
// entries from evicting frequently used entries. It adds some
|
||||||
// additional tracking overhead to the standard LRU cache, and is
|
// additional tracking overhead to the standard LRU cache, and is
|
||||||
// computationally about 2x the cost, and adds some metadata over
|
// computationally about 2x the cost, and adds some metadata over
|
||||||
|
2
vendor/github.com/hashicorp/golang-lru/lru.go
generated
vendored
2
vendor/github.com/hashicorp/golang-lru/lru.go
generated
vendored
@ -40,7 +40,7 @@ func (c *Cache) Purge() {
|
|||||||
c.lock.Unlock()
|
c.lock.Unlock()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add adds a value to the cache. Returns true if an eviction occured.
|
// Add adds a value to the cache. Returns true if an eviction occurred.
|
||||||
func (c *Cache) Add(key, value interface{}) bool {
|
func (c *Cache) Add(key, value interface{}) bool {
|
||||||
c.lock.Lock()
|
c.lock.Lock()
|
||||||
defer c.lock.Unlock()
|
defer c.lock.Unlock()
|
||||||
|
8
vendor/vendor.json
vendored
8
vendor/vendor.json
vendored
@ -184,12 +184,16 @@
|
|||||||
"revision": "36289988d83ca270bc07c234c36f364b0dd9c9a7"
|
"revision": "36289988d83ca270bc07c234c36f364b0dd9c9a7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"checksumSHA1": "d9PxF1XQGLMJZRct2R8qVM/eYlE=",
|
||||||
"path": "github.com/hashicorp/golang-lru",
|
"path": "github.com/hashicorp/golang-lru",
|
||||||
"revision": "5c7531c003d8bf158b0fe5063649a2f41a822146"
|
"revision": "a0d98a5f288019575c6d1f4bb1573fef2d1fcdc4",
|
||||||
|
"revisionTime": "2016-02-07T21:47:19Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"checksumSHA1": "2nOpYjx8Sn57bqlZq17yM4YJuM4=",
|
||||||
"path": "github.com/hashicorp/golang-lru/simplelru",
|
"path": "github.com/hashicorp/golang-lru/simplelru",
|
||||||
"revision": "5c7531c003d8bf158b0fe5063649a2f41a822146"
|
"revision": "a0d98a5f288019575c6d1f4bb1573fef2d1fcdc4",
|
||||||
|
"revisionTime": "2016-02-07T21:47:19Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "github.com/hashicorp/hcl",
|
"path": "github.com/hashicorp/hcl",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user