Skip to content

Comments

docs: add contributing section about cache busting in dev#1617

Merged
danielroe merged 4 commits intomainfrom
docs/dev-cache-busting
Feb 24, 2026
Merged

docs: add contributing section about cache busting in dev#1617
danielroe merged 4 commits intomainfrom
docs/dev-cache-busting

Conversation

@serhalp
Copy link
Member

@serhalp serhalp commented Feb 24, 2026

🔗 Linked issue

N/A - I learned this myself the hard way and decided to document it :)

🧭 Context

It isn't obvious how caching works in local dev

📚 Description

This adds a section to CONTRIBUTING.md about where caches are persisted in local dev and how to clear them.

@vercel
Copy link

vercel bot commented Feb 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs.npmx.dev Ready Ready Preview, Comment Feb 24, 2026 1:30pm
npmx.dev Ready Ready Preview, Comment Feb 24, 2026 1:30pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
npmx-lunaria Ignored Ignored Feb 24, 2026 1:30pm

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 24, 2026

📝 Walkthrough

Walkthrough

Adds a documentation subsection "Clearing caches during development" to CONTRIBUTING.md. Describes that Nitro persists defineCachedEventHandler caches to .nuxt/cache/nitro/ across dev server restarts, provides commands to clear all Nitro handler caches and a targeted example for npmx-picks, and documents an option to bypass the cache in development via shouldBypassCache: () => import.meta.dev. Notes that the .cache/ directory is a separate storage mount used for fetch-cache and atproto data.

🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description clearly relates to the changeset, explaining the purpose of adding cache-clearing documentation to CONTRIBUTING.md for local development.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/dev-cache-busting

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f4943b9 and d839b49.

📒 Files selected for processing (1)
  • CONTRIBUTING.md

@codecov
Copy link

codecov bot commented Feb 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

danielroe

This comment was marked as spam.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d839b49 and 0ec4b7a.

📒 Files selected for processing (1)
  • CONTRIBUTING.md

Comment on lines +132 to +138
```bash
# Clear all Nitro handler caches
rm -rf .nuxt/cache/nitro/handlers/

# Clear a specific handler cache (e.g. picks)
rm -rf .nuxt/cache/nitro/handlers/npmx-picks/
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Minor: comment label doesn't match the directory name in the example.

Line 136 says (e.g. picks) but the path immediately below it is npmx-picks/. Aligning the comment with the actual directory name avoids confusion.

✏️ Suggested fix
-# Clear a specific handler cache (e.g. picks)
+# Clear a specific handler cache (e.g. npmx-picks)
 rm -rf .nuxt/cache/nitro/handlers/npmx-picks/

)
```

The `.cache/` directory is a separate storage mount used for fetch-cache and atproto data.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Minor: .cache/ note lacks actionable context.

The note mentions the directory but leaves contributors without any guidance. Someone hitting stale fetch-cache or atproto data won't know whether or how to clear it. Consider either scoping the note ("the commands above do not affect .cache/") or adding a corresponding clear command.

✏️ Suggested expansion
-The `.cache/` directory is a separate storage mount used for fetch-cache and atproto data.
+The `.cache/` directory is a separate storage mount used for fetch-cache and atproto data. The commands above do not affect it; to clear it, run `rm -rf .cache/`.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
The `.cache/` directory is a separate storage mount used for fetch-cache and atproto data.
The `.cache/` directory is a separate storage mount used for fetch-cache and atproto data. The commands above do not affect it; to clear it, run `rm -rf .cache/`.

@danielroe danielroe enabled auto-merge February 24, 2026 11:52
@danielroe danielroe added this pull request to the merge queue Feb 24, 2026
Merged via the queue into main with commit d4e1ae9 Feb 24, 2026
20 checks passed
@danielroe danielroe deleted the docs/dev-cache-busting branch February 24, 2026 13:35
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.

4 participants