getCustomers() short-circuits to the in-memory resource only when cached.length > 0. A successfully loaded empty list ([]) takes the reload branch on every subsequent call, so a shop with zero customers (or a first sync that returned empty) hits /api/mark-wilson/customer again each time the UI asks.
hasValue() is already true; the length check treats "empty but settled" as "failed/unloaded". Use hasValue() (or a distinct uninitialized state) so a real empty list is served from memory like a non-empty one.
Repro: flush GET .../customer with [], call getCustomers() again — a second GET is issued.
Seen in projects/spikersoft/src/app/_services/marks-site/marks-customer/marks-customer.service.ts.
`getCustomers()` short-circuits to the in-memory resource only when `cached.length > 0`. A successfully loaded empty list (`[]`) takes the reload branch on every subsequent call, so a shop with zero customers (or a first sync that returned empty) hits `/api/mark-wilson/customer` again each time the UI asks.
`hasValue()` is already true; the length check treats "empty but settled" as "failed/unloaded". Use `hasValue()` (or a distinct uninitialized state) so a real empty list is served from memory like a non-empty one.
Repro: flush `GET .../customer` with `[]`, call `getCustomers()` again — a second GET is issued.
Seen in `projects/spikersoft/src/app/_services/marks-site/marks-customer/marks-customer.service.ts`.
Resolved in spikersoft-angular PR #819 (merged to master). Marks getCustomers does not refetch forever when the list is legitimately empty. Closing.
Resolved in spikersoft-angular [PR #819](https://git.spikersoft.com/spikerj/spikersoft-angular/pulls/819) (merged to `master`). Marks getCustomers does not refetch forever when the list is legitimately empty. Closing.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
getCustomers()short-circuits to the in-memory resource only whencached.length > 0. A successfully loaded empty list ([]) takes the reload branch on every subsequent call, so a shop with zero customers (or a first sync that returned empty) hits/api/mark-wilson/customeragain each time the UI asks.hasValue()is already true; the length check treats "empty but settled" as "failed/unloaded". UsehasValue()(or a distinct uninitialized state) so a real empty list is served from memory like a non-empty one.Repro: flush
GET .../customerwith[], callgetCustomers()again — a second GET is issued.Seen in
projects/spikersoft/src/app/_services/marks-site/marks-customer/marks-customer.service.ts.Resolved in spikersoft-angular PR #819 (merged to
master). Marks getCustomers does not refetch forever when the list is legitimately empty. Closing.