willianjusten / nba-nextjs

See NBA game results and standings powered by Next.js
https://nba.willianjusten.com.br
26 stars 2 forks source link

Fix API caches/revalidations and organization #2

Closed willianjusten closed 5 months ago

willianjusten commented 6 months ago

As of now I just created route handlers under /api folder, but we might want to reorganize this to be cleaner, try to reuse some logic that's pretty much the same as well.

Another thing that I noticed, is that NextJS is heavily caching those routes, which is quite annoying mainly to the Real Time route (/api/today), so we might want to check a way to let NextJS knows that we don't want to cache this route ever.