Next.js Discord

Discord Forum

s-maxage and caching

Unanswered
Grand Anglo-Français Blanc et No… posted this in #help-forum
Open in Discord
Grand Anglo-Français Blanc et NoirOP
i have a question about using res.setHeader, for ssr cache management. here is the code
res.setHeader(
    'Cache-Control',
    'public, s-maxage=864000, stale-while-revalidate=300'
  )


my question is
- is the s-maxage is too much & is this cause issues like an user who previously visited a page, wont be able to see the updated content?

love to know your opinions & suggestions

0 Replies