go 如果引入第三方内存缓存库的话,引入哪个好? 之前有用过,后来觉得有些使用场景比较小就改成 sync.map 了 ,现在用的场景有点多了。想要引入个质量高一点的第三方内存缓存库
2
Ayanokouji 10 天前 ![]() |
![]() |
3
ripperdev 10 天前
https://github.com/hashicorp/go-memdb 最近在用这个,consul 家出的
|
![]() |
4
cannotagreemore 10 天前
我司大规模项目在用,自研 sdk 也集成了这个实现,设计和文档质量都还不错
https://github.com/hypermodeinc/ristretto |
![]() |
5
Reficul 10 天前
|
![]() |
6
lepig 10 天前 ![]() 卧槽
5 个回复,5 个库。OP 岂不是更加就纠结了 |
7
leexsh31 10 天前
anycache
|
![]() |
8
LinusWong 10 天前 ![]() 这就是 go 吗,太百花齐放了
|
![]() |
10
wkzq 10 天前
|
![]() |
11
Aug 10 天前
选活跃的
|
![]() |
12
cooltechbs 10 天前
@LinusWong 碎片化哈哈哈
|
![]() |
13
me262 10 天前
楼上推荐的这些应用场景都不一样,用 ai 对比一下
|
![]() |
15
Rehtt 10 天前
根据需求自己搓一个
|
16
csfreshman 10 天前
百花齐放百家争鸣
|
![]() |
17
dabaibai 10 天前
直接来个性能对比图 让大家选
|
18
beihanggmj 10 天前
@lepig #6 😇😇😇
|
![]() |
19
ChunkitAu 10 天前
go-cache +1 使用也简单,当然看你项目规模,规模小 go-cache 足够使用了
|
20
craftsmanship 10 天前 via Android
Mode Python 笑而不语
|
![]() |
21
PungentSauce OP 我忘记之前用过 go-cache 还是 big-cache 了。 性能和功能性两方面吧。好多第三方 cache 不支持按照 key 进行过期设置就比较麻烦。
|
22
me221 10 天前
让我惊讶的是几个库的更新时间已经是几年前了?
go-cache: 6 years ago btree: 11 months ago Go 的兼容性这么好嘛 |
23
chimission 10 天前 ![]() @me221 go1.x 的更新开发者保证都是向后兼容的, 但是不保证以后得 go2
|
24
chimission 10 天前
我以前也是用的 go-cache 简单够用, 唯一不足就是不更新了,不过这个库做内存缓存也够了,更新不更新无所谓
|
![]() |
25
matrix1010 10 天前 ![]() @cannotagreemore 你司要不要考虑换一换?建议看看 https://news.ycombinator.com/item?id=44414630 。作为 Theine 的作者我向你推荐 otter
|
![]() |
27
wnanbei 10 天前
@chimission 已经没有 Go2 咯,只会有 1.xxx
|
![]() |
28
noyidoit 9 天前
go-cache+1 ,简单够用
|
![]() |
29
ZSeptember 9 天前
@matrix1010 #25 v2 大佬真多,我在用 theine ,还提过 issue 来着
|
![]() |
30
StarUDream 9 天前
|
31
wervserwe 9 天前
自己根据需求写个
|
33
spiritfelix 9 天前
看需求吧,我甚至用了 SQLite 做本地数据存储,目的是有些数据,关闭应用继续保留,开启应用继续使用,哦,忘了说,Wails 桌面端应用
|
![]() |
34
qloog 7 天前
https://github.com/hypermodeinc/ristretto 这个就很不错,各方面指标都很不错
ristretto 详细对比: https://hypermode.com/blog/introducing-ristretto-high-perf-go-cache 里面也提到了关于性能提升的一些关键点和参考,也有一些性能对比的参考图 作为 local cache 使用的案例: https://github.com/go-eagle/eagle/blob/master/pkg/cache/memory.go |
![]() |
35
qloog 7 天前
@Ayanokouji 看到 grafana 也在使用 otter
|
![]() |
38
815979670 5 天前
|
![]() |
39
gongym 5 天前
我记得我之前也做过选型,后来选了 redis
|