Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConcurrentLRU ¶
type ConcurrentLRU struct {
// contains filtered or unexported fields
}
func NewConcurrentLRU ¶
func NewConcurrentLRU( shardNum, maxSizePerShard int, onEvict func(key string, v interface{}), onGet func(key string, v interface{}) interface{}, ) *ConcurrentLRU
func (*ConcurrentLRU) Add ¶
func (c *ConcurrentLRU) Add(key string, v interface{})
func (*ConcurrentLRU) Clean ¶
func (c *ConcurrentLRU) Clean(f func(key string, v interface{}) (remove bool)) (removed int)
func (*ConcurrentLRU) Del ¶
func (c *ConcurrentLRU) Del(key string)
func (*ConcurrentLRU) Get ¶
func (c *ConcurrentLRU) Get(key string) (v interface{}, ok bool)
func (*ConcurrentLRU) Len ¶
func (c *ConcurrentLRU) Len() int
Click to show internal directories.
Click to hide internal directories.