Loading...
Loading...
Error
Oops! Something went wrong
8. How to Cache Data with the Key Option for useAsyncData and useFetch
Speed
Speed
Quality
Quality
Captions
Captions
media loading
Play
Pause
10
Seek backward
Rewind 10s
Play
Pause
Play
Play
Pause
Pause
20
Seek forward
Forward 20s
Mute
Unmute
Volume High
Volume Low
Volume Low
Mute
Mute
Unmute
0:00
0:00
Start casting
Stop casting
Chapters
Chapters
Introduction to the Key Option
00:00
Lesson Setup: Random User API Endpoint
00:13
API Endpoint Definition and Query String
00:20
Simulating Network Delay
00:39
Calling useFetch with lazy: true
00:44
Demonstrating lazy: true Caching with useFetch
00:58
useFetch Default Key Generation (URL-based)
01:21
Cache Behavior on Navigation with Default Key
01:39
Preventing Stale Data with Unique useFetch Key
01:55
Importance of Consistent Keys for Stale Data
02:27
Impact of Changing URL on useFetch Cache
02:34
No Stale Data with Dynamic URLs and useFetch
02:56
useFetch's Key Relies on URL
03:17
Overriding useFetch Key for Consistent Caching
03:30
Complete Control over Caching with key and lazy: true
03:49
Key Usage with useFetch Summary
04:09
Transition to useAsyncData
04:19
Using useAsyncData with a Callback Function
04:23
useAsyncData Displays Stale Data by Default
04:35
useAsyncData Key Generation (File & Line Number)
05:04
Consistent Key in useAsyncData Leads to Stale Data
05:18
Providing a Custom Key to useAsyncData
05:36
Preventing Stale Data with Unique useAsyncData Key
05:48
Demonstration of Unique Key in useAsyncData
06:18
Summary of Key Usage for Stale Data Control
06:33
Next Lesson: Get Cached Data Option
06:47
Enable captions
Disable captions
Enable Captions
Enable captions
Disable Captions
Disable captions
Settings
Settings
Settings
Enter fullscreen mode
Exit fullscreen mode
Fullscreen
Enter fullscreen
Exit Fullscreen
Exit fullscreen