Prefetching iOS
Prefetching is used in the SDK to improve the user experience by loading content before it's needed. For Stories and Moments, the SDK offers various prefetching levels—Low, Default, High, and Extreme—allowing for customized content caching policies.
Each level determines how much content is preloaded, both initially and during playback, to ensure seamless access to stories or moments with minimal waiting times for the user. The following types of behaviors are available for your convenience when setting the SDK's content caching policy if you feel like default is not what you expect.
Prefetching for Stories
| Value | Description |
|---|---|
| Low | Initially, no pre-fetch While playing, the next page of the currently playing story, and the first unread page of the next story |
| Default | Initially, pre-fetches the first story page in line. While playing, the next two pages of the currently playing story, the first two unread pages of the next story, and the first unread page of the second story in line. |
| High | Initially, pre-fetches the first page of the first three stories in line. While playing, pre-fetches the next three pages of the currently playing story, and the first two unread pages of the second and third stories in line. |
| Extreme | Initially, pre-fetches the first page of the first five stories in line. While playing, pre-fetches the next four pages of the currently playing story, the three, two, and one first unread pages of the following three stories in line, respectively. |
Prefetching for moments
| Value | Description |
|---|---|
| Low | Initially, no pre-fetch While playing, pre-fetches the consequent moment. |
| Default | Initially, pre-fetches the first moment in line. While playing, pre-fetches the next three moments. |
| High | Initially, pre-fetches the first three moments in line. While playing, pre-fetches the next four moments. |
| Extreme | Initially, pre-fetches the first five moments in line. While playing, pre-fetches the next five moments. |
Updated 2 months ago
Did this page help you?
