Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LRUCache ¶
type LRUCache struct {
// contains filtered or unexported fields
}
LRUCache cache struct
func (*LRUCache) Add ¶
Add add a key-value pair to LRU cache Params:
- key : cache key
- value: cache value
Return:
- evictOrNot: true if eviction occurs, false if not
func (*LRUCache) Del ¶
func (c *LRUCache) Del(key interface{})
Del delete cached value from cache Params:
- key: cache key
func (*LRUCache) EnlargeCapacity ¶
EnlargeCapacity enlarge the capacity of cache
Click to show internal directories.
Click to hide internal directories.