Course lesson

Prefetch and Cache Data in SolidStart

One way to avoid network waterfalls is to ensure we fetch our data as early as possible. Ideally, this data preload should happen when loading our route or even before.

Duration
2 min
Access
Free
Transcript
Retained from source evidence

One way to avoid network waterfalls is to ensure we fetch our data as early as possible. Ideally, this data preload should happen when loading our route or even before.

While this is helpful, data preloading can accidentally trigger duplicate requests, so some sort of request deduplication might be helpful.

In this lesson, we will learn how to leverage the route preload functionality to prefetch some data and then wrap these functions with cache to perform request deduplication.