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://codercto.com/soft/d/13479.html

Designing Data-Intensive Applications

Designing Data-Intensive Applications

Martin Kleppmann / O'Reilly Media / 2017-4-2 / USD 44.99

Data is at the center of many challenges in system design today. Difficult issues need to be figured out, such as scalability, consistency, reliability, efficiency, and maintainability. In addition, w......一起来看看 《Designing Data-Intensive Applications》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

MD5 加密
MD5 加密

MD5 加密工具