11
string Get(string key){
lock(_sync){
// DoSomething
}
}
If DoSomething depend only on key, I want key dependent lock. I think it may be dictionary with sync objects. Is there any complete solution?
Something like real example What is the best way to lock cache in asp.net?