FAQs
Does setting the next.js ISR value affect Spark?
Although Spark doesn't need ISR as rebuilds or invalidation of the cache are triggered by a publish we still set the revalidate value. The main reasons behind are:
- A simple control of the cache-control header used for the CDN caching of pages.
- As a fallback for sites or even environments that are not configured to use Spark. i.e. you might add a new site that hasn't yet been configured in Spark, it can at least still revalidate prior to being setup.
Although it is not essential to have ISR configured when using Spark, it doesn't cause any issue having it set and it provides other benefits.
Does Spark support revalidateTag in next.js
Spark does support revalidation by tag. Customers must ensure that tags are added to the correct pages/fetches to ensure that the revalidation will work. Implementation guidance can be found in the Spark NPM package (https://www.npmjs.com/package/@dataweavers/spark-nextjs).
Does Spark support SitecoreAI Publishing V2?
Spark does support Sitecore publishing V2. Sitecore publishing V2 works by only sending updates for datasources which have changed in a publish. If these tags have been associated to the page/datasource fetch then Spark can be configured (revalidateTag) to support this.
Note: revalidate tag support is only available for Next.js App Router and the Spark module will support revalidate tag for Next.js 15 and above.
Does Spark revalidate just pages or will it revalidate components?
Spark has two configurations, revalidate by path, or revalidate by tag.
Revalidate by path or page will only revalidate pages and is the only supported process for Next.js Pages Router.
Revalidate by tag is able to revalidate fetches, which could be understood to be pages or components. Spark utilises the next.js revalidate process, which when tags are used, is anything it has stored in the cache associated to the relevant tag. There are some points of consideration:
- Adding tags to components is the responsibility of the customer. Some guidance is provided in the Spark NPM module readme for revalidate tag support.
- CDN cache invalidation in Arc, whilst supporting tags, will actually purge pages associated with the relevant tag.
Limitations
SitecoreAI
- The Spark regeneration process will only regenerate static pages that are managed and served from SitecoreAI. If content that is used to define the page is from a third-party system, Spark will not be sent a notification on any content updates and the page regeneration will not be triggered.
- Partial designs containing renderings linked to datasources that are loosely linked to page items, i.e. local:/ and page:/ will not trigger an update. Partial Designs can use reference links to datasources of pages they are utilised on. If these datasources are updated and the page is published, then SitecoreAI will not directly notify Experience Edge that the page has changed. As such Spark will not regenerate the page. In these scenarios, Content Authors can use the Pages publish mechanism, or in Content Editor, they can publish the pages themselves.
- Wildcards in content are not supported in Spark because the publishing process is not able to ascertain page paths to regenerate.
Related to