Sharing a Bucket across request

Hi @jereesh,
We recommend sharing a single instance of a bucket for the lifetime of the application. This is due to the setup time and resources need to configure setup the bucket connection.

ClusterHelper found in the SDK is a singleton implementation and the recommended way to get a bucket instance.

First call ClusterHelper.Initialize, with the settings for the cluster.
There after call ClusterHelper.GetBucket, with bucket name and password to get a shared a thread safe instance to the bucket.

I hope this helps
Martin

1 Like