跳到主要內容

快取

Prisma Postgres 自帶內建的全域性快取(由 Prisma Accelerate 啟用),可幫助您加速資料庫查詢。

您可以使用任何 Prisma ORM 查詢中的 cacheStrategy 選項,在每個查詢級別快取結果,例如:

const users = await prisma.user.findMany({
cacheStrategy: {
ttl: 60,
swr: 60
}
})

請檢視快取文件以瞭解詳情。

© . This site is unofficial and not affiliated with Prisma Data, Inc.