[docs-infra] Improve Netlify caching
Open
Nobody has claimed this yet.
performance
scope: docs-infra
- Dominant language
- JavaScript
- Stars
- 99.1k
- Forks
- 32.5k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 106
Description
Steps to reproduce
- The logic we have in packages/netlify-plugin-cache-docs/index.js looks outdated.
See https://github.com/netlify/next-runtime/pull/1223 we should likely look at the cache in the/docs/.next/cachefolder rather than the whole .next. Maybe we should use https://github.com/netlify/next-runtime. - 7 GB downloaded? it takes almost 1 minute to restore. https://app.netlify.com/sites/material-ui-x/deploys/642593889ca49100080aca02. It’s strange, it’s a lot.
- The cache saving looks broken https://app.netlify.com/sites/mui-toolpad-docs/deploys/642f0428d101b500087c1a56 2 files seems way too low.
Search keywords: Netlify caching
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in packages/netlify-plugin-cache-docs/index.js and compare its current logic with the referenced netlify/next-runtime pull request. Verify which cache paths are restored and saved for the documentation build, especially /docs/.next/cache versus the whole .next directory. Done means avoiding the excessive 7 GB restore and no longer saving only two files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- build-system, cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100