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

LRU for image-cache #32

Merged
merged 5 commits into from
Feb 15, 2015
Merged

LRU for image-cache #32

merged 5 commits into from
Feb 15, 2015

Conversation

darkyen
Copy link
Contributor

@darkyen darkyen commented Feb 14, 2015

Least Recently Used Cache for Image Cache

Abhishek Hingnikar added 2 commits February 14, 2015 19:41
Least Recently Used Cache for Image Cache
@darkyen
Copy link
Contributor Author

darkyen commented Feb 14, 2015

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];

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().

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 :)

@mjohnston
Copy link

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.

@darkyen
Copy link
Contributor Author

darkyen commented Feb 15, 2015

All done.

mjohnston pushed a commit that referenced this pull request Feb 15, 2015
@mjohnston mjohnston merged commit 8ea85aa into Flipboard:master Feb 15, 2015
@brentvatne brentvatne mentioned this pull request Feb 15, 2015
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

Successfully merging this pull request may close these issues.

None yet

2 participants