Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API cache #125

Open
sounisi5011 opened this issue Jan 5, 2020 · 1 comment
Open

API cache #125

sounisi5011 opened this issue Jan 5, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@sounisi5011
Copy link
Owner

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:

  • Too late. Generally, network requests take time.
  • Netlify API is rate limited. Requests to the API are limited to a maximum of 200 per minute.
  • 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.

@sounisi5011 sounisi5011 added the enhancement New feature or request label Jan 5, 2020
@sounisi5011
Copy link
Owner Author

I propose JSON Lines as a cache file format.
JSON Lines has the following features:

  • Do not need to pre-parse all data. It is sufficient to read only the required data line by line.
  • The data format is compatible with JSON.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant