There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
NullReferenceException in LRUCache
There is a bug in LRUCache implementation in method GetValue. When removing first item after capacity limit was hit there are double remove from 'lruList' and single remove from 'data', so from that point 'lruList' start shrinking until there are no items
left and 'lruList.First' will throw NullReferenceException.
I've attached fixed LRUCache.cs with commented second remove from 'lruList'.