I\'m using a dictionary inside of some Task.
Logically I have set it up so that my Keys will never clash, though sometimes when I am adding to the dictionary I get this
So you might think Whatever! it will just break the one time
- but nope:
There goes three hours of sales (until IIS recycled on a schedule) because of a dictionary added for debugging purposes that wasn't ever even being read from.
Note: This was running for 3.5 years before I hit this condition.
private Dictionary _debugLookup;
_debugLookup[key] = virtualPath;
This wasn't even a static dictionary - it was an MVC IViewLocationCache
that was an instance method.