Skip to content

Instantly share code, notes, and snippets.

Created Feb 28, 2013
What would you like to do?
Add to the LRU cache.
public void Add(TKey key, TValue value)
if (_dict.ContainsKey(key))
var ts = new TimeStamped(value);
var kv = new KeyValuePair(key, ts);
var node = new LinkedListNode(ts);
_dict[key] = node;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment