-- TTL cache for DoH/A/AAAA resolutions (pipeline domain ingest).
CREATE TABLE domain_resolve_cache (
    fqdn         TEXT PRIMARY KEY,
    addrs_json   JSONB NOT NULL DEFAULT '[]',
    resolved_at  TIMESTAMPTZ NOT NULL DEFAULT now()
);

CREATE INDEX idx_domain_resolve_cache_resolved ON domain_resolve_cache (resolved_at);
