I am using the NodeJS client for aerospike, and trying to set the ttl for a record, below is the code for the same.
insert(key, value) {
return new Promise(function (resolve, reject) {
aerospike.put(key, value, function (err) {
if (err.code !== aerospikeStatus.AEROSPIKE_OK) {
reject("Failed to insert in secondary storage");
}
else {
resolve(true);
}
});
});
}
I am following the official documentation, but unable to find the a way to set ttl through NodeJS client. Would someone happen to know how to do the same?
(http://www.aerospike.com/docs/client/nodejs/usage/kvs/write.html)