Next.js Discord

Discord Forum

How do I ensure the ImageResponse is cached

Answered
Taken posted this in #help-forum
Open in Discord
I run the ImageResponse under it's own api endpoint but the image for the / page shouldn't change unless i rebuild. how can i ensure the image produced is cached. here is the code for the endpoint.
Answered by Taken
nvm i moved this to a function with large cache time and called it in the api so it works
View full answer

4 Replies

i cant post it as it's soo many characgters
nvm i moved this to a function with large cache time and called it in the api so it works
Answer