标签: javascript node.js
该代码用于验证缓存数据是否存在。
const cached = await cache.get(session.sid); const out = { valid: !! cached }; if (out.valid) { out.credentials = cached.account; }