Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CacheLRU ¶
type CacheLRU struct { Queue *list.List Cache map[any]*Item // key would be the type used in correspondent method // contains filtered or unexported fields }
CacheLRU acts as LRU caching based on the capacity and the cache. The queue is the double linked list from which the LRU element is deleted as needed. The cache key should be a hasheable type.
func NewCacheLRU ¶
Click to show internal directories.
Click to hide internal directories.