mirror of
https://github.com/privacy-scaling-explorations/pse.dev.git
synced 2026-04-23 03:01:03 -04:00
feat: disable Vercel cache
This commit is contained in:
@@ -44,10 +44,9 @@ export async function GET() {
|
||||
|
||||
const responseJson = NextResponse.json({ events, page })
|
||||
|
||||
// Disable vercel cache
|
||||
responseJson.headers.set(
|
||||
'Cache-Control',
|
||||
'no-store, no-cache, must-revalidate, proxy-revalidate'
|
||||
'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0, s-maxage=0, stale-while-revalidate=0'
|
||||
)
|
||||
responseJson.headers.set('Pragma', 'no-cache')
|
||||
responseJson.headers.set('Expires', '0')
|
||||
|
||||
@@ -16,7 +16,7 @@ const fetcher = async (url: string) => {
|
||||
|
||||
export function useGetNotionEvents() {
|
||||
const { data, error } = useSWR<{ events: EventProps['event'][]; page: any }>(
|
||||
`/api/events`,
|
||||
`/api/events?timestamp=${Date.now()}`,
|
||||
fetcher,
|
||||
{
|
||||
refreshInterval: 60000,
|
||||
|
||||
Reference in New Issue
Block a user