C# Dictionary Performance

前端 未结 5 1703
死守一世寂寞
死守一世寂寞 2021-01-05 20:01

I am using a Dictionary to store data, and will be caching it. I would like to avoid server memory issues, and have good performance by limiting the size of the Dictionary&

5条回答
  •  滥情空心
    2021-01-05 20:55

    You will need to create your own class inheriting from the Dictionary class. Override the Add and set Item methods to limit the number of entries as objects are added.

提交回复
热议问题