Skip to content

fix: refactor caching, fix : in project and change the shape of results cache - #11453

Merged
sheremet-va merged 3 commits into
mainfrom
refactor/caching-base
Oct 2, 2026
Merged

sheremet-va merged 3 commits into
mainfrom
refactor/caching-base

Conversation

@sheremet-va

Copy link
Copy Markdown
Member

This PR:

  • unifies caching into a single VitestCache class with subclasses for results/modules
  • fix cache checks if project has : in the name
  • accepts cache only as a boolean (only affects results cache though - maybe a better name like fsModuleCache is needed)
  • makes read/write faster
Step Old build Optimized
Update + write, 2,000 files 6.2 ms 4.2 ms
Update + write, 10,000 files 29 ms 20 ms
Sort with results, 2,000 files 71 ms 2.2 ms
Sort with results, 10,000 files 461 ms 11 ms
Sort without results, 10,000 files 486 ms 27 ms
Rerun of 1 file, 2,000 files 49 ms 45.8 ms
Rerun of 1 file, 10,000 files 75.5 ms 58.5 ms

Changes are backwards compatible and will help with implementing --stale

@netlify

netlify Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for vitest-dev ready!

Name Link
🔨 Latest commit 05a48c3
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/6abfd6a102dbe30008f893ef
😎 Deploy Preview https://deploy-preview-11453--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Comment thread docs/api/advanced/vitest.md Outdated
@sheremet-va
sheremet-va merged commit 9673c49 into main Oct 2, 2026
6 of 9 checks passed
@sheremet-va
sheremet-va deleted the refactor/caching-base branch October 2, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant