-
Notifications
You must be signed in to change notification settings - Fork 923
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
LRU for image-cache #32
Conversation
Least Recently Used Cache for Image Cache
:-|
Patched now. (The madness occured because I updated the method tested decided too small removed it at the end and then committed, -- somewhere in b/w forgot i need to make the function direct-- ) |
}, | ||
|
||
_reduceLeastUsed: function (least, currentHash) { | ||
var current = this.elements[currentHash]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can use _instancePool.elements[currentHash]
instead of this
, and remove the runtime binding in popLeastUsed()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More nit-picking: 2 space indent instead of 4 :)
I like this change. If you could address the minor things I mentioned in comments, and then take a second to fill out the CLA we can merge this into master. |
All done. |
Least Recently Used Cache for Image Cache