Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Python dicts are now ordered. Parent comment
* Inserting into the cache is just normal insertion.
* To delete excessive items, simply iterate to get the first few items' keys, then delete.
* To lookup, simply do a key-based lookup, then delete and re-insert.
There are no comments on this comment yet.
* Inserting into the cache is just normal insertion.
* To delete excessive items, simply iterate to get the first few items' keys, then delete.
* To lookup, simply do a key-based lookup, then delete and re-insert.