Ankur Datta
Ankur Datta
PPrisma
Created by jeromec8194 on 9/3/2024 in #help-and-questions
Deploying to Vercel
I could see that failing as it would do sth like: prisma.myModel.create( { null } )
7 replies
PPrisma
Created by jeromec8194 on 9/3/2024 in #help-and-questions
Deploying to Vercel
❌ prisma.myModel.create( {data} ) seems to fail silently, the console.log that follows it never runs. I've triple checked, data matches my db's schema....
Do you have some logs for us to look at? And is it possible that data is null somehow?
7 replies
PPrisma
Created by sylvester stallone on 3/28/2024 in #help-and-questions
is there still no option to manually invalidate the cache?
Hey @Ved and @Raj 👋🏾 , thanks for letting your interest known. We'll reach out to you once the feature is out 😄 .
11 replies
PPrisma
Created by Sabin Adams on 8/14/2024 in #help-and-questions
Pulse Type
Thanks @Sabin Adams !
16 replies
PPrisma
Created by Sabin Adams on 8/14/2024 in #help-and-questions
Pulse Type
Hey @Sabin Adams 👋🏾 , hope you're doing well 😃 !
A lot of the docs and integrations seemed out of date
Could you share which part of the docs did you find out to be outdated 🙏🏾 ?
16 replies
PPrisma
Created by sylvester stallone on 3/28/2024 in #help-and-questions
is there still no option to manually invalidate the cache?
@colhoop we're working on cache invalidation for Accelerate 😄 . Keep an eye on the #announcements channel for any news on this 👀 .
11 replies
PPrisma
Created by Bobson on 7/4/2024 in #help-and-questions
Setting up Prsma Pulse with AWS RDS
11 replies
PPrisma
Created by Bobson on 7/4/2024 in #help-and-questions
Setting up Prsma Pulse with AWS RDS
Hey there @Bobson , Can you connect to your database from Prisma ORM from your localhost or a tool such as PgAdmin?
11 replies
PPrisma
Created by johnk on 6/20/2024 in #help-and-questions
Prisma Nuxt RollupError
Hey @yinxingmaiming6409 , do you have a small reproduction of the issue? That'll help me identify what the issue maybe.
8 replies
PPrisma
Created by johnk on 6/20/2024 in #help-and-questions
Prisma Nuxt RollupError
Hey there @johnk , Can you provide some steps to reproduce the error? - What version of Nuxt are you running? - Is it a fresh project or is there any custom config? - What version of NodeJs are you using? That'll help us debug the issue better 🙂 .
8 replies
PPrisma
Created by Yonatan on 5/2/2024 in #help-and-questions
Pulse listening to all schemas in my RDS instance
Hey @Yonatan 👋🏾 , this is intended by default. To listen to specific changes in your schema, you'll have to create custom publications and submit the publication name when starting a new pulse project; You can follow our advanced setup guide which is available on our paid plans. https://www.prisma.io/docs/pulse/database-setup/general-database-instructions#manage-your-own-publication-slot
2 replies
PPrisma
Created by sylvester stallone on 3/28/2024 in #help-and-questions
is there still no option to manually invalidate the cache?
how would this work on a findMany
It would be a bit tricky with findMany, but it's doable.
await prisma.user.findMany({
data: {
where: {
id: {
in: [1, 2, 3]
},
OR: {
cacheKey: cacheKey // No model would have this cache key, but you can update it regardless, so that Accelerate views it as a different query
// The OR would ensure that the correct data is still returned
}
}
},
cacheStrategy: {
ttl: 100
}
})
await prisma.user.findMany({
data: {
where: {
id: {
in: [1, 2, 3]
},
OR: {
cacheKey: cacheKey // No model would have this cache key, but you can update it regardless, so that Accelerate views it as a different query
// The OR would ensure that the correct data is still returned
}
}
},
cacheStrategy: {
ttl: 100
}
})
Let me know if I need to elaborate 😄 .
Also when is cache invalidation shipping in accelerate? is there an RFP we could trakc?
We have no timelines for this as of yet. I'll let you know once we have something 🙏🏾 .
11 replies
PPrisma
Created by sylvester stallone on 3/28/2024 in #help-and-questions
is there still no option to manually invalidate the cache?
Hey @sylvester stallone 👋🏾 , To manually invalidate the cache you have to go to the platform console. You can also create add a cacheKey field in your model such as,
model User {
id @id @unique
name String
description String
cacheKey String @unique
}
model User {
id @id @unique
name String
description String
cacheKey String @unique
}
You would have to store the cacheKey in some key value store and update it on every invalidation.
// change cache key value
const updateCacheKey = await updateCacheKey(userId)

await prisma.user.update({
data: {
updateCacheKey,
...otherUpdates
}
})
// change cache key value
const updateCacheKey = await updateCacheKey(userId)

await prisma.user.update({
data: {
updateCacheKey,
...otherUpdates
}
})
During reads,
const updateCacheKey = await getCacheKey(userId)
await prisma.user.findUnique({
data: {
where: {
id: userId,
cacheKey: cacheKey
}
},
cacheStrategy: {
ttl: 100
}
})
const updateCacheKey = await getCacheKey(userId)
await prisma.user.findUnique({
data: {
where: {
id: userId,
cacheKey: cacheKey
}
},
cacheStrategy: {
ttl: 100
}
})
This would guarantee invalidations on every update, even on development. Let me know if this helps!
11 replies