I used cluster-node-cache with following code.
var obj = { my: "Special", variable: 42 };
cache.set("myKey", obj).then(function(result) {
console.log(result.err);
console.log(result.success);
cache.get("myKey").then(function(result2) {
console.log(result2.err);
console.log(result2.success);
});
});
This resulted in following output
null
true
null
undefined
Certainly, with this result, cluster-node-cache is not a solution for caching requirement with cluster.
Please suggest best solution and why that solution is best?