mirror of
https://github.com/spliit-app/spliit.git
synced 2026-02-26 17:36:12 +01:00
Use React’s cache to avoid some queries to the database
This commit is contained in:
@@ -9,7 +9,9 @@ export async function getPrisma() {
|
||||
prisma = new PrismaClient()
|
||||
} else {
|
||||
if (!(global as any).prisma) {
|
||||
;(global as any).prisma = new PrismaClient()
|
||||
;(global as any).prisma = new PrismaClient({
|
||||
// log: [{ emit: 'stdout', level: 'query' }],
|
||||
})
|
||||
}
|
||||
prisma = (global as any).prisma
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user