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

add an LRU cache container to the standard library #4988

Closed
thestinger opened this issue Feb 17, 2013 · 5 comments
Closed

add an LRU cache container to the standard library #4988

thestinger opened this issue Feb 17, 2013 · 5 comments
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@thestinger
Copy link
Contributor

It would be really nice to have a very efficient, reusable implementation of this common pattern. It can be implemented as a hash table with an intrusive doubly linked list threaded through the entries.

This is also how Python implements OrderedDict and Java implements LinkedHashMap.

@ghost ghost assigned msullivan Jun 13, 2013
@msullivan
Copy link
Contributor

I'll try to hack this out sometime this summer.

@bblum
Copy link
Contributor

bblum commented Jul 18, 2013

Key point of my dup issue referred about is that it should be Sendable, and might need to be implemented as a flat vector with integer-index-addressing for that to happen.

@danielwaterworth
Copy link

I've started writing a generic, intrusive doubly linked list implementation.

@danielwaterworth
Copy link

I've implemented this here.

bors added a commit that referenced this issue Dec 5, 2013
There's an open issue ([Issue #4988](#4988)) for adding an LRU Cache to the standard library. I'm new to this so I hope I didn't miss anything I'm supposed to do.
@huonw
Copy link
Member

huonw commented Dec 6, 2013

#10211 added extra::lru_cache, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

No branches or pull requests

5 participants