Commit 1dee5ab
authored
Allow cacheLife to error (#890)
Next.js currently bundles proxy in a way that is indistinguishable from page code but in this context "use cache" isn't turned into a Cache Function so calls to `cacheLife` error. This will be fixed in Next.js but as an interrim fix we can just try/catch and suppress the error. This is safe for our context becasue we know we only call this from within "use cache" and we know that in any environment without "use cache" it should just fall back to normal behavior.1 parent b5cc954 commit 1dee5ab
File tree
2 files changed
+21
-8
lines changed- .changeset
- packages/edge-config/src
2 files changed
+21
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
40 | 48 | | |
41 | 49 | | |
42 | 50 | | |
| |||
0 commit comments