Files
2026-07-26 18:25:37 +09:00

9 lines
304 B
JavaScript

import { UserKeypairs } from "../models/index.js";
import { Cache } from "./cache.js";
const cache = new Cache("keypairStore", 60 * 30);
export async function getUserKeypair(userId) {
return await cache.fetch(userId, ()=>UserKeypairs.findOneByOrFail({
userId: userId
}), true);
}