Vercel caching drizzle db call to Neon
Unanswered
Gray-tailed Tattler posted this in #help-forum
Gray-tailed TattlerOP
Got a simple route that's calls an action. Using force-dynamic but still my data is being cached until I purge data cache on Vercel.
import React from 'react'
import { cn } from '@/lib/utils'
import { getData } from "@/actions/cafeActions"
import Cafes from '@/components/Cafes'
export const dynamic = 'force-dynamic'
const CafesPage = async () => {
const data = await getData()
return (
<div>
<Cafes cafes={data} />
</div>
)
}
export default CafesPageexport const getData = async () => {
const data = await db.select().from(cafe).orderBy(asc(cafe.id))
return data
}