I am looking to implement caching at a request level for a WCF Service. Each request to this service performs a large number of database calls. Think multiple data collectors. We need to allow one data collector to access the information already retrieved by a preceding data collector.
I was looking to use the new .Net 4.0 Memory cache for this by creating a specific instance per request.
Is this a good idea ? Or should I simply use a Dictionary object ?
BTW : The data collection is going to be in parallel, so there will be more complexities around locking but I could use concurrent collections for that as well.
question from:
https://stackoverflow.com/questions/12595911/memory-cache-or-concurrent-dictionary 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…