-
Notifications
You must be signed in to change notification settings - Fork 15
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
提供 lrucache 的适配实现 #3
Comments
想确认下是想要实现这种效果吗?
|
有个问题,golang-lru.expirable golang-lru只提供了统一的key过期时间,不支持对key指定过期时间,如果适配过来的话对key指定过期时间这个功能就需要阉割掉了;如果我们既要用golang-lru又要自己管理过期时间的话,实现方式和这个关闭的pr差不多,但会存在并发问题。这样看来最合适的办法是自研一个lrucache... |
我草!这么坑? |
那还是算了,我们自己搞一个吧 |
简单实现
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
目前在 GO 语言里面,有一个比较有名的项目,叫做 https://github.com/hashicorp/golang-lru,把这个适配过来我们的 Cache 接口。
同样保持面向依赖注入的风格。
The text was updated successfully, but these errors were encountered: