diff options
author | Christopher Speller <crspeller@gmail.com> | 2018-09-28 12:40:17 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-28 12:40:17 -0700 |
commit | a8c01377bce777bf1940850e390e587c290e98e0 (patch) | |
tree | 0e176269b5faae110bb402b209d4f192654a435c /vendor/github.com/hashicorp/golang-lru/simplelru | |
parent | 006623e0f737ca7ee5d482fe47c09048a6f3d06a (diff) | |
download | chat-a8c01377bce777bf1940850e390e587c290e98e0.tar.gz chat-a8c01377bce777bf1940850e390e587c290e98e0.tar.bz2 chat-a8c01377bce777bf1940850e390e587c290e98e0.zip |
Updating server dependancies. (#9498)
Diffstat (limited to 'vendor/github.com/hashicorp/golang-lru/simplelru')
-rw-r--r-- | vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go b/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go index 744cac01c..74c707744 100644 --- a/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go +++ b/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go @@ -1,37 +1,36 @@ package simplelru - // LRUCache is the interface for simple LRU cache. type LRUCache interface { - // Adds a value to the cache, returns true if an eviction occurred and - // updates the "recently used"-ness of the key. - Add(key, value interface{}) bool + // Adds a value to the cache, returns true if an eviction occurred and + // updates the "recently used"-ness of the key. + Add(key, value interface{}) bool - // Returns key's value from the cache and - // updates the "recently used"-ness of the key. #value, isFound - Get(key interface{}) (value interface{}, ok bool) + // Returns key's value from the cache and + // updates the "recently used"-ness of the key. #value, isFound + Get(key interface{}) (value interface{}, ok bool) - // Check if a key exsists in cache without updating the recent-ness. - Contains(key interface{}) (ok bool) + // Check if a key exsists in cache without updating the recent-ness. + Contains(key interface{}) (ok bool) - // Returns key's value without updating the "recently used"-ness of the key. - Peek(key interface{}) (value interface{}, ok bool) + // Returns key's value without updating the "recently used"-ness of the key. + Peek(key interface{}) (value interface{}, ok bool) - // Removes a key from the cache. - Remove(key interface{}) bool + // Removes a key from the cache. + Remove(key interface{}) bool - // Removes the oldest entry from cache. - RemoveOldest() (interface{}, interface{}, bool) + // Removes the oldest entry from cache. + RemoveOldest() (interface{}, interface{}, bool) - // Returns the oldest entry from the cache. #key, value, isFound - GetOldest() (interface{}, interface{}, bool) + // Returns the oldest entry from the cache. #key, value, isFound + GetOldest() (interface{}, interface{}, bool) - // Returns a slice of the keys in the cache, from oldest to newest. - Keys() []interface{} + // Returns a slice of the keys in the cache, from oldest to newest. + Keys() []interface{} - // Returns the number of items in the cache. - Len() int + // Returns the number of items in the cache. + Len() int - // Clear all cache entries - Purge() + // Clear all cache entries + Purge() } |