Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

妙到颠毫: bigcache优化技巧 #158

Open
smallnest opened this issue Nov 27, 2019 · 7 comments
Open

妙到颠毫: bigcache优化技巧 #158

smallnest opened this issue Nov 27, 2019 · 7 comments

Comments

@smallnest
Copy link
Owner

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

@q191201771
Copy link

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

@smallnest
Copy link
Owner Author

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

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

@xiaoyuzdy
Copy link

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
	}

@soooldier
Copy link

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

Copy link

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

Copy link

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

@haobanz
Copy link

haobanz commented Dec 19, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants