Skip to content

/api/callsign lookups bypass the server-side callsign caches #1130

Description

@accius

Split out from a review observation by @alanhargreaves on #1096 ("ok it looks like /api/callsign does not check our caches. It probably should.").

The DX-paths enrichment pipeline maintains callsignLookupCache (24h TTL, populated by background HamQTH lookups in server/routes/dxcluster.js), but the /api/callsign/:call route appears to run its own lookup chain without consulting it — so the same callsign can be resolved repeatedly against external services (QRZ/HamQTH) even when we already hold a fresh answer.

Expected: /api/callsign/:call should check the shared cache(s) before any external lookup, and populate them on a miss, so the popup lookups and the paths enrichment share one pool.

Why it matters: fewer external API calls (QRZ/HamQTH rate budgets are per-key), faster popup responses, and the paths enrichment benefits from popup-triggered lookups for free.

There is already a TODO in server/routes/dxcluster.js noting the duplicated lookup chain ("Refactor lookup chain into callsign.js") — this issue is the concrete user-visible half of that refactor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions