Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache provides a generic thread-safe lru cache that can be used for storing filters, blocks, etc.
func NewCache ¶
NewCache return a cache with specified capacity, the cache's size can't exceed that given capacity.
func (*Cache) Get ¶
Get will return value for a given key, making the element the most recently accessed item in the process. Will return nil if the key isn't found.
Source Files
¶
- lru.go
Click to show internal directories.
Click to hide internal directories.