Next.js Discord

Discord Forum

Can SSG work with cache invalidation for a route like '/resources/[slug]'

Unanswered
Cimarrón Uruguayo posted this in #help-forum
Open in Discord
Cimarrón UruguayoOP
Is this possible?

7 Replies

yes it should
@joulev yes it should
Cimarrón UruguayoOP
so if i dynamically create a new possible slug in that pattern, would that still count as SSG?
@joulev what do you mean?
Cimarrón UruguayoOP
ssg works in this context by finding all possible values for slug, and pre-rendering them like static content
for the route pattern /resources/[slug]
but say you dynamically add another possible value for slug, e.g programmatically