过期时间操作
检索文档并设置失效时间
失效时间单位是秒
bucket.getAndTouch("xiaoming",4, function(err, result) {
console.log(result);
});
console打印出来获取的数据,4秒钟之后数据自动删除.
另一个方法:
bucket.touch("xiaoming1",60, function(err, result) {
console.log(result);
});
Last updated
Was this helpful?