Go 缓存库 LRUCache

码农软件 · 软件分类 · 缓存系统 · 2019-08-30 08:42:14

软件介绍

用 Go 编写的一个简单的 LRUCache 库,示例代码:

// define a type that can be used with the cache
type myCacheableValue struct {
}

func (v *myCacheableValue) Size() uint64 {
    return 64
}

// create a LRUCache
cache := lrucache.New(1989)

// put value to the cache
value := myCacheableValue{}
cache.Set("key", value)

// get value from the cache
v, ok := cache.Get("key")

本文地址:https://www.codercto.com/soft/d/13479.html

老二非死不可

老二非死不可

方三文 / 机械工业出版社 / 2013-12 / 39.00

关于投资 价值投资者为啥都买茅台? 怎样识别好公司与坏公司? 做空者真的罪大恶极吗? 国际板对A股会有什么影响? 波段操作,止损割肉到底靠不靠谱? IPO真的是A股萎靡不振的罪魁祸首吗? 关于商业 搜狐的再造战略有戏吗? 新浪如何焕发第二春? 百度的敌人为什么是它自己? 我为什么比巴菲特早两年投资比亚迪? 民族品牌这张牌还靠谱......一起来看看 《老二非死不可》 这本书的介绍吧!

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试