-
Notifications
You must be signed in to change notification settings - Fork 118
feat: open page #34 #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
app.get("/open", async (req, res) => { | ||
console.log("in open"); | ||
const userCount = await prismaClient.user.count(); | ||
const trainedModelCount = await prismaClient.model.count({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this endpoint is doing too many DB calls. Can we make it more optimal?
Also cache this to 1 day intervals.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I already cached the data and revalidating every hour using ISR let me set it for a day
Resolves #34
Dark


Light:

