Skip to content

Commit b665210

Browse files
icyJosephwyattjoh
authored andcommitted
docs: remove emojis from use cache private
1 parent 6f52da4 commit b665210

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

docs/01-app/03-api-reference/01-directives/use-cache-private.mdx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -197,13 +197,13 @@ This ensures user-specific data is never accidentally shared between users while
197197
> **Note:** Functions with a `cacheLife` stale time less than 30 seconds will not be runtime prefetched, even when using `'use cache: private'`. This prevents prefetching of rapidly changing data that would likely be stale by navigation time.
198198
199199
```tsx
200-
// Will be runtime prefetched (stale ≥ 30s)
200+
// Will be runtime prefetched (stale ≥ 30s)
201201
cacheLife({ stale: 60 })
202202

203-
// Will be runtime prefetched (stale ≥ 30s)
203+
// Will be runtime prefetched (stale ≥ 30s)
204204
cacheLife({ stale: 30 })
205205

206-
// Will NOT be runtime prefetched (stale < 30s)
206+
// Will NOT be runtime prefetched (stale < 30s)
207207
cacheLife({ stale: 10 })
208208
```
209209
@@ -213,20 +213,20 @@ The following request-specific APIs can be used inside `'use cache: private'` fu
213213
214214
| API | Allowed in `use cache` | Allowed in `'use cache: private'` |
215215
| -------------- | ---------------------- | --------------------------------- |
216-
| `cookies()` | No | ✅ Yes |
217-
| `headers()` | No | ✅ Yes |
218-
| `searchParams` | No | ✅ Yes |
219-
| `connection()` | No | ❌ No |
216+
| `cookies()` | No | Yes |
217+
| `headers()` | No | Yes |
218+
| `searchParams` | No | Yes |
219+
| `connection()` | No | No |
220220
221221
> **Note:** The `connection()` API is prohibited in both `use cache` and `'use cache: private'` as it provides connection-specific information that cannot be safely cached.
222222
223223
## Nesting rules
224224
225225
Private caches have specific nesting rules to prevent cache pollution:
226226
227-
- Private caches **can** be nested inside other private caches
228-
- Private caches **cannot** be nested inside public caches
229-
- Public caches **can** be nested inside private caches
227+
- Private caches **can** be nested inside other private caches
228+
- Private caches **cannot** be nested inside public caches
229+
- Public caches **can** be nested inside private caches
230230
231231
```tsx
232232
// ✅ VALID: Private inside private
@@ -241,7 +241,7 @@ async function innerPrivate() {
241241
return getData()
242242
}
243243

244-
// INVALID: Private inside public
244+
// INVALID: Private inside public
245245
async function outerPublic() {
246246
'use cache'
247247
const result = await innerPrivate() // Error!

0 commit comments

Comments
 (0)