initItem to init item for LFU
(k string, v any, f int)
| 42 | |
| 43 | // initItem to init item for LFU |
| 44 | func initItem(k string, v any, f int) item { |
| 45 | return item{ |
| 46 | key: k, |
| 47 | value: v, |
| 48 | freq: f, |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | // Get the key in cache by LFU |
| 53 | func (c *LFU) Get(key string) any { |