Response Cache - Cache Placeholder Mode
The example uses vue3 as an example, but you can also use alova in react and svelte. For details, please read the Getting Started Guide;
example description
The cache placeholder mode is to persist the response data. It will be updated to the data state as placeholder data immediately after refreshing the page. At the same time, a request is sent. Developers can use placeholder data to replace the Loading state before responding.
Operation guide:
- Click
Reload page
to refresh the page, you no longer see the Loading status, but the old data is rendered and replaced with new data when the request is responded; - Click
Invalidate the data of placeholder
to invalidate the cached data, then you will see the Loading status again;