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

Already on GitHub? Sign in to your account

fix bugs, add "eviction event" feature #1

merged 3 commits into from Apr 18, 2012


None yet
2 participants

dustyleary commented Apr 17, 2012

First, I apologize for a pile-o-code out of nowhere. It's not my intention to hijack your project.

I had meant to just add the 'evict' event, but I ran into a bug or two along the way, which I fixed, and added tests for... But, because I am easily confused, I changed the implementation a bit to add an explicit 'remove' method, which the other methods delegate to.

If you grab the lru-test.js and run it against the original library, you'll see that a number of the tests fail... Most importantly imo is that the LRU invariant is not kept when you call get() and the element being retrieved is in the head or tail position.

@chriso chriso added a commit that referenced this pull request Apr 18, 2012

@chriso chriso Merge pull request #1 from dustyleary/master
fix bugs, add "eviction event" feature

@chriso chriso merged commit 7279569 into chriso:master Apr 18, 2012


chriso commented Apr 18, 2012

This is great thanks. I ended up using a different language for a project I was working on and didn't get to finish this.

@chriso chriso added a commit that referenced this pull request Apr 18, 2012

@chriso chriso Add dustyleary as a contributor, re #1 3431ec7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment