You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: v2/data-props/once-props.mdx
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Once Props
3
3
---
4
4
5
-
Some data rarely changes or is expensive to compute. Rather than resolving this data on every request, you may use _once props_. These props are remembered by the client and reused on subsequent pages that include the same prop. This makes them ideal for [shared data](/v2/data-props/shared-data).
5
+
Some data rarely changes, is expensive to compute, or is simply large. Rather than including this data in every response, you may use _once props_. These props are remembered by the client and reused on subsequent pages that include the same prop. This makes them ideal for [shared data](/v2/data-props/shared-data).
6
6
7
7
## Creating Once Props
8
8
@@ -42,7 +42,7 @@ You may set an expiration time using the `until()` method. This method accepts a
You may also define a dedicated `shareOnce()` method in your middleware.
@@ -102,7 +102,7 @@ class HandleInertiaRequests extends Middleware
102
102
103
103
Once props work with [prefetching](/v2/data-props/prefetching). The client automatically includes any remembered once props in prefetched responses, so navigating to a prefetched page will already have the once props available.
104
104
105
-
The prefetch cache also respects once prop expiration. Prefetched pages containing an expired once prop will be invalidated.
105
+
Prefetched pages containing an expired once prop will be invalidated from the cache.
0 commit comments