Currently, there's no caching set for these.
One simple heuristic would be to allow caching for GET requests for a small amount of time, e.g.
if (route.method === "GET") {
res.setHeader("Cache-Control", "public, max-age=30");
}
which would work well for use cases like someone hitting the back button.
Another possibility would be changing GET API requests to include the commit hash of the client bundle and setting the cache to some very long time (e.g. a year), so that any e.g. article is cached for that bundle.
Currently, there's no caching set for these. One simple heuristic would be to allow caching for GET requests for a small amount of time, e.g.
which would work well for use cases like someone hitting the back button. Another possibility would be changing GET API requests to include the commit hash of the client bundle and setting the cache to some very long time (e.g. a year), so that any e.g. article is cached for that bundle.