gitalk icon indicating copy to clipboard operation
gitalk copied to clipboard

妙到颠毫: bigcache优化技巧

Open smallnest opened this issue 6 years ago • 7 comments

https://colobu.com/2019/11/18/how-is-the-bigcache-is-fast/

smallnest avatar Nov 27 '19 07:11 smallnest

我是yoko blog的作者,感谢大佬引用了我的文章。 第一次离大佬这么近。 以前找资料时经常访问到您的网站,文章写的都很棒。 也在网上看过您的技术分享。 以后多向大佬学习。

q191201771 avatar Dec 10 '19 11:12 q191201771

谢谢yoko, 看到你的文章我才注意到bigcache 这个库

@q191201771 我是yoko blog的作者,感谢大佬引用了我的文章。 第一次离大佬这么近。 以前找资料时经常访问到您的网站,文章写的都很棒。 也在网上看过您的技术分享。 以后多向大佬学习。

smallnest avatar Dec 11 '19 01:12 smallnest

bigcache 貌似也没解决hash 冲突

if entryKey := readKeyFromEntry(wrappedEntry); key != entryKey {
		if s.isVerbose {
			s.logger.Printf("Collision detected. Both %q and %q have the same hash %x", key, entryKey, hashedKey)
		}
		s.lock.RUnlock()
		s.collision()
		return nil, ErrEntryNotFound
	}

xiaoyuzdy avatar Dec 27 '19 05:12 xiaoyuzdy

"但是对于并发的读,最终还是把写变成了串行"这个是不是错了呀?应该是"但是对于并发的写,最终还是把写变成了串行"

soooldier avatar Oct 23 '20 03:10 soooldier

话说,有没有磁盘文件缓存 比较好的golang框架推荐呢?

danlanxiaohei avatar Apr 22 '22 07:04 danlanxiaohei

比如,业务先去内存里找缓存,内存里没有,再去本地磁盘找缓存,再没有,就去数据源拉取,有没有比较好的 磁盘文件缓存库呢?

danlanxiaohei avatar Apr 22 '22 07:04 danlanxiaohei

比如,业务先去内存里找缓存,内存里没有,再去本地磁盘找缓存,再没有,就去数据源拉取,有没有比较好的 磁盘文件缓存库呢? 找到了吗 我最近也有类似的需求

haobanz avatar Dec 19 '22 10:12 haobanz