Documentation ¶
Index ¶
- type Cache
- type LruCache
- func (c *LruCache) Add(key, value interface{})
- func (c *LruCache) Cap() int
- func (c *LruCache) Clear() int
- func (c *LruCache) Contains(key interface{}) (ok bool)
- func (c *LruCache) Get(key interface{}) (value interface{}, ok bool)
- func (c *LruCache) Keys() []interface{}
- func (c *LruCache) Len() int
- func (c *LruCache) Peek(key interface{}) (value interface{}, ok bool)
- func (c *LruCache) ReCap(newCap int) (err error)
- func (c *LruCache) Remove(key interface{}) (ok bool)
- func (c *LruCache) Set(key, value interface{}) (ok bool)
- func (c *LruCache) Values() []interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface { Add(key, value interface{}) Set(key, value interface{}) (ok bool) Get(key interface{}) (value interface{}, ok bool) Peek(key interface{}) (value interface{}, ok bool) Remove(key interface{}) (ok bool) Contains(key interface{}) (ok bool) Len() int Cap() int Clear() int ReCap(int) error Keys() []interface{} Values() []interface{} }
type LruCache ¶
type LruCache struct {
// contains filtered or unexported fields
}
func NewLruCache ¶
Click to show internal directories.
Click to hide internal directories.