project_next_14_ai_prompt_sharing icon indicating copy to clipboard operation
project_next_14_ai_prompt_sharing copied to clipboard

/api/prompt getting cached in Vercel

Open hassam-saeed opened this issue 2 years ago • 3 comments

All of the other API's are working fine on production but the /api/prompt is getting cached only on the production environment but not on the local environment

hassam-saeed avatar Nov 23 '23 14:11 hassam-saeed

Same Here

Hasnainahmad04 avatar Dec 20 '23 05:12 Hasnainahmad04

is there any solution to this problem?

Abhigupta13 avatar May 14 '24 20:05 Abhigupta13

You can disable caching by adding this line in your api/prompt/route.ts

export const dynamic = "force-dynamic";

you can check options here

Hasnainahmad04 avatar Jul 18 '24 05:07 Hasnainahmad04