mui / mui/material-ui

[docs-infra] Improve Netlify caching

Open
#41,123 0 comments 0 reactions 0 assignees View on GitHub

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
  1. 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/cache folder rather than the whole .next. Maybe we should use https://github.com/netlify/next-runtime.
  2. 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.

Screenshot 2023-04-07 at 15 23 56

  1. The cache saving looks broken https://app.netlify.com/sites/mui-toolpad-docs/deploys/642f0428d101b500087c1a56 2 files seems way too low.
Screenshot 2023-04-09 at 19 25 06

Search keywords: Netlify caching

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.