I am new to couchbase server and installed the server in one system and trying to cache the data by ,net client in another server.
Server:
- installed and setup “username1”/“password1”
- created bucket … used “travel-sample”
Created app.config as below,
<servers bucket=“travel-sample” bucketPassword="" username=“username1” password =“password1”>
<add uri=“http://**...:8091/pools”/>
</servers>
C# code: Fetch the hashtable data and trying to cache in couchbase as like below
private CouchbaseClient _instance;
public cacheHandler()
{
_instance = new CouchbaseClient();
}
public long updateCache(ref Hashtable dataList)
{
Stopwatch st = new Stopwatch();
st.Start();
foreach (string key in dataList.Keys)
{
IStoreOperationResult res = _instance.ExecuteStore(StoreMode.Set, key, dataList[key]);
if (res.Success)
{
success += 1;
}
else
{
failed += 1;
if (failed == 1)
{
failedErr = res.Message;
}
}
}
return st.ElapsedMilliseconds;
}
}
I am getting “Could not locate Node” error while ExecuteStore() …
PLease guide me if I am missing something… help me how to cache the data in my case