LRUCache icon indicating copy to clipboard operation
LRUCache copied to clipboard

A lightweight thread-safe LRU cache for .NET

Results 3 LRUCache issues
Sort by recently updated
recently updated
newest added

@tejacques The following functions cannot be safely called from two concurrent threads since Dictionary does not seem to be thread-safe: TryAdd, TryGetValue. _count must be reset to zero after Clear...

``` 2019-10-29 14:21:47.9702|ERROR|RepairMajor.GenerateMinuteBarForWeistock|9| errorfile E:\MarketRaw1\CME_CBT\2018112800.market |System.ArgumentNullException: 值不能为 null。 在 System.Threading.Monitor.Enter(Object obj) 在 Caching.LRUCache`2.TryGetValue(K key, V& value) 位置 c:\Users\TJ\Projects\LRUCache\src\LRUCache\LRUCache.cs:行号 114 在 History.Lib.Common.GetProductID(String contract) 位置 E:\Code\DevelopmentDepartment\source\MessageServer\History_AddCache\HistoryLib\Common.cs:行号 372 在 RepairMajor.GenerateMinuteBarForWeistock.c__DisplayClass2_0.b__9(String item) 位置 E:\Code\DevelopmentDepartment\source\MessageServer\History_AddCache\RepairMajor\GenerateMinuteBarForWeistock.cs:行号...