old/stale data

Hi, I have built a full-stack billing software. Now in my deployment, when my API calls drizzle queries, they sometimes get old data. For example here I had 1 canteenBill. which I then deleted. so doing this should give an empty array, which I do get.
db.query.canteenBills.findMany()
db.query.canteenBills.findMany()
But doing this gives me 1 old object!!
db.select().from(canteenBills)
.where(eq(canteenBills.billId, 14))
db.select().from(canteenBills)
.where(eq(canteenBills.billId, 14))
This is surprising behaviour.
2 Replies
Mario564
Mario5643mo ago
Drizzle doesn't cache any query results, so there might an issue with the API you're designing
pratyush
pratyushOP3mo ago
Yea, got it it was nextjs, caching every api endpoint
Want results from more Discord servers?
Add your server