I’m thinking about using class (singleton) with collections implemented using ConcurrentDictionary. This class will be used as a cache implementation (asp.net / wcf).
What do you think about exposing these collections explicitely from such class vs exposing just e.g. 3 methods (get,add,clear) for each of them (using safe methods from CD) ?
As you’re implementing a cache then I’d suggest only exposing those methods that you need to the outside world, to prevent any unexpected side-effects that result if a.n.other user fiddles with the dictionary.