package
Version:
v0.30.9
Opens a new window with list of versions in this module.
Published: Feb 8, 2023
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 1
Opens a new window with list of known importers.
Documentation
¶
func (lru *Lru) Get(k interface{}) (v interface{}, exist bool)
func (lru *Lru) Put(k interface{}, v interface{}) bool
注意:
1. 无论插入前,元素是否已经存在,插入后,元素都会存在于Lru容器中
2. 插入元素时,也会更新热度(不管插入前元素是否已经存在)
@return 插入前元素已经存在则返回false
Source Files
¶
Click to show internal directories.
Click to hide internal directories.