Commit 06cd2d8
perf(identifier): restrict stale-cache guard to UPDATE path in saveIdentifier()
The ContentTypeAPI lookup that resolves a missing base_type was running on every
saveIdentifier() call regardless of whether it was an INSERT or UPDATE. INSERT
callers always provide base_type (set in createNewIdentifier), so the guard was
only ever needed for UPDATE — where a stale cached Identifier loaded before the
backfill ran could write null back over a freshly populated value.
Moving the guard inside the isIdentifier==true branch eliminates the API+DB call
on all INSERT paths, making bulk operations (imports, publishing pipelines) that
create many new identifiers unaffected during the migration window.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 09f112b commit 06cd2d8
1 file changed
Lines changed: 17 additions & 17 deletions
Lines changed: 17 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
521 | 521 | | |
522 | 522 | | |
523 | 523 | | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
524 | 541 | | |
525 | 542 | | |
526 | 543 | | |
| |||
529 | 546 | | |
530 | 547 | | |
531 | 548 | | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | | - | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | 549 | | |
550 | 550 | | |
551 | 551 | | |
| |||
0 commit comments