YohanSciubukgian / CosmosDbConnector

MIT License
0 stars 0 forks source link

Address issue #1 : Cache the container to avoid object creation #3

Open YohanSciubukgian opened 4 years ago

YohanSciubukgian commented 4 years ago

The AzureCosmosDbV3Connector should be registered as a Singleton on a real project usage. The Dictionary will do a cache-aside on the Container object to avoid creating the object for each operation.

bartelink commented 4 years ago

This should use a ConcurrentDictionary (and using GetValueElseAdd will make the code cleaner)