Skip to content

Commit d839b49

Browse files
committed
docs: add contributing section about cache busting in dev
1 parent f4943b9 commit d839b49

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

CONTRIBUTING.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ This focus helps guide our project decisions as a community and what we choose t
3131
- [Setup](#setup)
3232
- [Development workflow](#development-workflow)
3333
- [Available commands](#available-commands)
34+
- [Clearing caches during development](#clearing-caches-during-development)
3435
- [Project structure](#project-structure)
3536
- [Local connector CLI](#local-connector-cli)
3637
- [Mock connector (for local development)](#mock-connector-for-local-development)
@@ -124,6 +125,20 @@ pnpm test:a11y # Lighthouse accessibility audits
124125
pnpm test:perf # Lighthouse performance audits (CLS)
125126
```
126127

128+
### Clearing caches during development
129+
130+
Nitro persists `defineCachedEventHandler` results to disk at `.nuxt/cache/nitro/`. This cache **survives dev server restarts**. If you're iterating on a cached API route and want fresh results, delete the relevant cache file:
131+
132+
```bash
133+
# Clear all Nitro handler caches
134+
rm -rf .nuxt/cache/nitro/handlers/
135+
136+
# Clear a specific handler cache (e.g. picks)
137+
rm -rf .nuxt/cache/nitro/handlers/npmx-picks/
138+
```
139+
140+
The `.cache/` directory is a separate storage mount used for fetch-cache and atproto data.
141+
127142
### Project structure
128143

129144
```

0 commit comments

Comments
 (0)