rateLimit.rest is the per-minute REST meter; rateLimit.history is the
separate hourly history budget. Every field can be null, because every
field can legitimately be absent: an unmetered plan advertises nothing,
and neither does a publicly cacheable response, since the figures are
per-caller and a shared cache would hand one caller's to another.
null therefore means "the server did not say", never "nothing left". Use
isExhausted, which is true only when it said zero.
Read from the inner transport rather than a copy, so a cache HIT -- which
sends no request and so learns nothing -- correctly leaves the last known
figures standing. A hit spent no budget either.
What the server last said about your two budgets.
rateLimit.restis the per-minute REST meter;rateLimit.historyis the separate hourly history budget. Every field can be null, because every field can legitimately be absent: an unmetered plan advertises nothing, and neither does a publicly cacheable response, since the figures are per-caller and a shared cache would hand one caller's to another.null therefore means "the server did not say", never "nothing left". Use
isExhausted, which is true only when it said zero.Read from the inner transport rather than a copy, so a cache HIT -- which sends no request and so learns nothing -- correctly leaves the last known figures standing. A hit spent no budget either.