shadcn.io
Diff Text
20/100
shadcn.io
/
Diff Text
Preview
Code
Install
Docs
All Text
20 of 100
function getUser(id: string) {
-
return db.user.findUnique({ where: { id } })
+
return db.user.findUniqueOrThrow({ where: { id } })
}
-
const cache = new Map()
+
const cache = new LRUCache({ max: 500 })