package
module
Version:
v0.0.2
Opens a new window with list of versions in this module.
Published: Mar 3, 2022
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Documentation
¶
Cache 一个内存缓存库,支持过期和后台更新
NewCache 初始化缓存,缓存数量超过size将使用lru算法淘汰
Get 获取key缓存的值,如不存在则使用loader函数加载缓存
如果使用后台更新,函数直接返回过期的值,并使用协程调用loader更新缓存
Source Files
¶
Click to show internal directories.
Click to hide internal directories.