I am using a class that makes use of a static ConcurrentDictionary object for caching purposes. When data is requested, it first looks in the ConcurrentDictionary. If it is not found there, it is retrieved from the database, and put in the ConcurrentDictionary.
The data stays in this collection across multiple requests, as it should. But is this special behavior due to it being a ConcurrentDictionary instead of a regular Dictionary, or is that just the behavior of any static object?
Also, sometimes when I load the page, it has to reload data from the database. Where is this data stored, and what would cause this cache/dictionary to be cleared? Is there a timeout setting in IIS for the website or application pool that controls this?