Commit 500e253
committed
Fix parameterized collection caching and in-flight request tracking
- Compute params key directly in _startCollectionFetch to ensure parameterized
collections (e.g., { status: 'active' }) are tracked separately from
non-parameterized collections for in-flight request coalescing
- Add paramsKeyMismatch check to force fetch when ref's paramsKey doesn't match
- Add neverFetchedForParams check to ensure new parameterized refs always fetch
- Fix isCollectionLoading to use correct key format (was using undefined collectionKey)
This fixes the issue where calling col('invoices') followed by
col('invoices', { params: { status: 'active' } }) would incorrectly
skip the second fetch because in-flight tracking wasn't properly
distinguishing parameterized collections.1 parent 827812b commit 500e253
1 file changed
Lines changed: 17 additions & 4 deletions
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1242 | 1242 | | |
1243 | 1243 | | |
1244 | 1244 | | |
1245 | | - | |
| 1245 | + | |
1246 | 1246 | | |
1247 | 1247 | | |
1248 | 1248 | | |
| |||
1515 | 1515 | | |
1516 | 1516 | | |
1517 | 1517 | | |
1518 | | - | |
1519 | | - | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
1520 | 1524 | | |
1521 | 1525 | | |
1522 | 1526 | | |
| |||
1527 | 1531 | | |
1528 | 1532 | | |
1529 | 1533 | | |
1530 | | - | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
1531 | 1544 | | |
1532 | 1545 | | |
1533 | 1546 | | |
| |||
0 commit comments