package
Version:
v1.4.7-beta.0
Opens a new window with list of versions in this module.
Published: Nov 12, 2016
License: Apache-2.0
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func NewCache(maxSize int) Cache
func (c *Cache) Add(index uint64, obj interface{}) bool
Returns true if object already existed, false otherwise.
func (c *Cache) Get(index uint64) (obj interface{}, found bool)
type LRUExpireCache struct {
}
func NewLRUExpireCache(maxSize int) *LRUExpireCache
func (c *LRUExpireCache) Add(key lru.Key, value interface{}, ttl time.Duration)
func (c *LRUExpireCache) Get(key lru.Key) (interface{}, bool)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.