diff --git a/src/lib/dbPools.ts b/src/lib/dbPools.ts index c5c41da..d1950b5 100644 --- a/src/lib/dbPools.ts +++ b/src/lib/dbPools.ts @@ -28,12 +28,12 @@ function buildConnString(db: { } export async function getPoolForDbId(db_id: string) { - const now = Date.now(); - const cached = poolCache.get(db_id); - if (cached) { - cached.lastUsed = now; - return cached.pool; - } + // const now = Date.now(); + // const cached = poolCache.get(db_id); + // if (cached) { + // cached.lastUsed = now; + // return cached.pool; + // } // load credentials from central metadata table (prisma database model) const dbRec = await prisma.database.findUnique({ where: { db_id } }); @@ -59,7 +59,7 @@ export async function getPoolForDbId(db_id: string) { idleTimeoutMillis: 30000, }); - poolCache.set(db_id, { pool, lastUsed: now }); + // poolCache.set(db_id, { pool, lastUsed: Date.now() }); return pool; }