In the current code, the response of the Netlify API is not cached in order to get the latest data.
However, fetching data about every deploy has the following problems:
Network requests can fail. If there is a cache for the preview page, it should be possible to build even without a network connection.
To solve the above problem, we propose to cache the API response.
Data from older deploys will probably not change. Therefore, it should be possible to cache.
In the current code, the response of the Netlify API is not cached in order to get the latest data. However, fetching data about every deploy has the following problems:
To solve the above problem, we propose to cache the API response. Data from older deploys will probably not change. Therefore, it should be possible to cache.