Updates hashicorp/golang-lru.
This commit is contained in:
parent
de6801675f
commit
f1b47817f2
|
@ -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
|
|
@ -20,7 +20,7 @@ const (
|
|||
// TwoQueueCache is a thread-safe fixed size 2Q cache.
|
||||
// 2Q is an enhancement over the standard LRU cache
|
||||
// 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
|
||||
// additional tracking overhead to the standard LRU cache, and is
|
||||
// computationally about 2x the cost, and adds some metadata over
|
||||
|
|
|
@ -40,7 +40,7 @@ func (c *Cache) Purge() {
|
|||
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 {
|
||||
c.lock.Lock()
|
||||
defer c.lock.Unlock()
|
||||
|
|
|
@ -184,12 +184,16 @@
|
|||
"revision": "36289988d83ca270bc07c234c36f364b0dd9c9a7"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "d9PxF1XQGLMJZRct2R8qVM/eYlE=",
|
||||
"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",
|
||||
"revision": "5c7531c003d8bf158b0fe5063649a2f41a822146"
|
||||
"revision": "a0d98a5f288019575c6d1f4bb1573fef2d1fcdc4",
|
||||
"revisionTime": "2016-02-07T21:47:19Z"
|
||||
},
|
||||
{
|
||||
"path": "github.com/hashicorp/hcl",
|
||||
|
|
Loading…
Reference in New Issue