Commit f41441a
authored
Durable use cache: optimize env var existence checks (#98504)
We now separately track code that accesses non-inlined env vars at
runtime in two categories
- (existing) actual reads, the full value is accessed
- (new) only unset/falsy/truthy is read at runtime
For the second case, we only need to invalidate use-cache functions when
the given env var transitioned betwen unset/falsy/truthy. But
transitioning between two different truthy values doesn't caused
invalidation.1 parent 30d6d8f commit f41441a
58 files changed
Lines changed: 852 additions & 138 deletions
File tree
- crates
- next-api
- src
- next-core/src/next_manifests
- packages/next/src
- build/webpack/plugins
- server
- app-render
- use-cache
- test/production/app-dir
- use-cache-code-hash
- app
- env-existence
- next-image
- use-cache-cross-deployment
- turbopack/crates/turbopack-ecmascript
- src
- analyzer/graph
- references
- tests
- analyzer/graph
- array-map
- array
- async-lazy-init
- conditional-import
- createRequire
- esbuild-reduced
- esbuild
- free-vars
- iife-2
- import-meta-prop
- issue-75938
- md5-reduced
- md5_2
- member-call
- member-prop
- mongoose-reduced
- new-url
- object
- op-assign
- other-free-vars
- pack-2521
- pack-2682
- path-join
- process-and-os
- require-context
- this-binding
- try
- webpack-target-node
- worker
- references/env-var-info
- static-assign-obj
- static-existence
- static
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
51 | | - | |
| 53 | + | |
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
| |||
353 | 355 | | |
354 | 356 | | |
355 | 357 | | |
356 | | - | |
| 358 | + | |
| 359 | + | |
357 | 360 | | |
358 | 361 | | |
359 | 362 | | |
| |||
405 | 408 | | |
406 | 409 | | |
407 | 410 | | |
408 | | - | |
| 411 | + | |
409 | 412 | | |
410 | | - | |
411 | | - | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
412 | 418 | | |
413 | 419 | | |
414 | 420 | | |
| |||
457 | 463 | | |
458 | 464 | | |
459 | 465 | | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
460 | 484 | | |
461 | 485 | | |
462 | 486 | | |
| |||
465 | 489 | | |
466 | 490 | | |
467 | 491 | | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
| 492 | + | |
| 493 | + | |
479 | 494 | | |
480 | 495 | | |
481 | 496 | | |
482 | 497 | | |
483 | 498 | | |
484 | 499 | | |
485 | | - | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
486 | 511 | | |
487 | 512 | | |
488 | 513 | | |
| |||
493 | 518 | | |
494 | 519 | | |
495 | 520 | | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | 521 | | |
515 | | - | |
| 522 | + | |
516 | 523 | | |
517 | 524 | | |
518 | 525 | | |
519 | 526 | | |
520 | | - | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
521 | 541 | | |
522 | 542 | | |
523 | 543 | | |
524 | 544 | | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
525 | 553 | | |
526 | 554 | | |
527 | 555 | | |
528 | 556 | | |
529 | | - | |
| 557 | + | |
| 558 | + | |
530 | 559 | | |
531 | 560 | | |
532 | 561 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
472 | 472 | | |
473 | 473 | | |
474 | 474 | | |
475 | | - | |
| 475 | + | |
| 476 | + | |
476 | 477 | | |
477 | 478 | | |
478 | 479 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
| 78 | + | |
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
375 | 375 | | |
376 | 376 | | |
377 | 377 | | |
378 | | - | |
| 378 | + | |
| 379 | + | |
379 | 380 | | |
380 | 381 | | |
381 | 382 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3675 | 3675 | | |
3676 | 3676 | | |
3677 | 3677 | | |
3678 | | - | |
3679 | | - | |
| 3678 | + | |
3680 | 3679 | | |
3681 | | - | |
3682 | | - | |
3683 | | - | |
| 3680 | + | |
| 3681 | + | |
| 3682 | + | |
3684 | 3683 | | |
3685 | 3684 | | |
3686 | 3685 | | |
| |||
3702 | 3701 | | |
3703 | 3702 | | |
3704 | 3703 | | |
3705 | | - | |
3706 | | - | |
| 3704 | + | |
| 3705 | + | |
3707 | 3706 | | |
3708 | | - | |
3709 | | - | |
3710 | | - | |
| 3707 | + | |
| 3708 | + | |
| 3709 | + | |
| 3710 | + | |
| 3711 | + | |
| 3712 | + | |
| 3713 | + | |
| 3714 | + | |
3711 | 3715 | | |
3712 | 3716 | | |
3713 | 3717 | | |
3714 | | - | |
| 3718 | + | |
3715 | 3719 | | |
3716 | 3720 | | |
3717 | 3721 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| |||
0 commit comments