📅  最后修改于: 2022-03-11 15:02:07.158000             🧑  作者: Mango
async function upsert(table, data) {
let key = table;
if (data && data.id) {
key = key + '_' + data.id;
}
client.setex(key, 10, JSON.stringify(data));
return true;
}