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

Android 缓存策略的文章。引用ruheng的那篇的LRUCache 原理错了。 #49

Open
woxiangxin7779 opened this issue Oct 22, 2018 · 0 comments

Comments

@woxiangxin7779
Copy link

LruCache的核心思想很好理解,就是要维护一个缓存对象列表,其中对象列表的排列方式是按照访问顺序实现的,即一直没访问的对象,将放在队尾,即将被淘汰。而最近访问的对象将放在队头,最后被淘汰。

这是错的,应该是 访问的放到队尾,新添加的元素也放到队尾,删除是从队首 删除的。另外图解也是错的。请纠正,以免误导后来的读者。

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

No branches or pull requests

1 participant