The main problem is that you do not provide the timeout argument for memcached.setAsync , but it is a required argument for memcached.set . These two lines are equivalent:
memcached.set("foo", "bar", () => { }); memcached.setAsync("foo", "bar").then(() => { })
Add a timeout argument, and your code should work as expected.
source share