Commit c8ab2a2
committed
feat(core): type-safe backend creation, safer item pooling, and cleanup around expiration handling
hypercache: refactor New into helpers and call resolveBackend without explicit type params; avoid returning expired items to the pool in Get/GetWithInfo/GetOrSet/GetMultiple to prevent zeroing live references while still coalescing expiration triggers
cache/item: zero Item before returning to pool to avoid retaining large values across reuses
spelling: add “backpressure” to cspell dictionary
Context: preserves public API and behavior, improves memory hygiene and correctness for expired-item paths, and keeps backend construction strictly typed.1 parent de43b99 commit c8ab2a2
3 files changed
Lines changed: 11 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| |||
535 | 535 | | |
536 | 536 | | |
537 | 537 | | |
538 | | - | |
539 | | - | |
| 538 | + | |
540 | 539 | | |
541 | 540 | | |
542 | 541 | | |
| |||
559 | 558 | | |
560 | 559 | | |
561 | 560 | | |
562 | | - | |
563 | | - | |
| 561 | + | |
564 | 562 | | |
565 | 563 | | |
566 | 564 | | |
| |||
580 | 578 | | |
581 | 579 | | |
582 | 580 | | |
583 | | - | |
584 | | - | |
| 581 | + | |
585 | 582 | | |
586 | 583 | | |
587 | 584 | | |
| |||
659 | 656 | | |
660 | 657 | | |
661 | 658 | | |
662 | | - | |
663 | | - | |
664 | | - | |
| 659 | + | |
665 | 660 | | |
666 | 661 | | |
667 | 662 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
46 | 51 | | |
47 | 52 | | |
48 | 53 | | |
| |||
0 commit comments