@cfxlabsinc/b2b-services
    Preparing search index...

    Root of the ledger-account class hierarchy: it owns the one ledger-account-search cache both surfaces share and the seam that busts it.

    Every reader and writer extends this class — LedgerAccountQueryService / LedgerAccountService on the consumer side, LedgerAccountAdminQueryService / LedgerAccountAdminService on the admin side. That replaces a mutual cross-construction in which each service built a detached ServiceCache over the other's namespace purely to bust it; see SearchCache for why a detached buster cannot keep read-after-write honest.

    Hierarchy (View Summary)

    Index
    cache: ServiceCache<CachedSearchPage<LedgerAccountSearchItem>>
    withoutBalanceCache: ServiceCache<
        CachedSearchPage<LedgerAccountSearchItemWithoutBalance>,
    >

    Balance-free pages: their own key space, reached by the same namespace tags.

    • Clear each customer's membership tag and each record tag wherever cached, and always this namespace's collection tag. keys are exact deletes in this instance's key space: the only bust a null client honours.

      Parameters

      • __namedParameters: {
            customerIds: readonly string[];
            keys?: readonly CacheKey[];
            records?: readonly string[];
        }

      Returns Promise<void>

    • The bust every ledger account write makes, whatever it changed: its record tag in every namespace copying its columns, its customer's pages on both surfaces, and the folded get keys, the one bust a null client honours. A balance change is no account write and clears none of it.

      Parameters

      • __namedParameters: { customerId: string; id: string }

      Returns Promise<void>

    • Tags for a page: the scope its query searched (each customer's membership tag, else the collection tag), so an empty page is bustable too, plus the records it projects and the fields that chose or ordered its rows.

      Parameters

      • __namedParameters: {
            customerIds: readonly string[] | undefined;
            fields?: readonly string[];
            records?: readonly string[];
        }

      Returns string[]