const cache = new WeakMap();

export async function getUserForReq(req) {
    if (cache.has(req)) {
        return cache.get(req);
    }

    return await User.get(req.form.session_id);
}