I wish to have a concurrent dictionary whereby the items expire if they haven't been used for a certain period of time.
Now this seems like a fairly simple class to create but I have done some searching and come across MemoryCache
. It seems like exactly what I want (see CacheItemPolicy.SlidingExpiration
). I am wondering if that does what I want - or if there are any blaring disadvantages for my use case?
This is a client-side WPF application.