| 38 | } |
| 39 | |
| 40 | bool Insert(const Key& key, const TPtr& value) { |
| 41 | if (!Contains(key)) { |
| 42 | TWriteGuard w(Mutex); |
| 43 | return Cache.Insert(key, value); |
| 44 | } |
| 45 | return false; |
| 46 | } |
| 47 | |
| 48 | void Update(const Key& key, const TPtr& value) { |
| 49 | TWriteGuard w(Mutex); |