{"version":"2.1.223","anchor":"usage-stats-cache-is-sanitised-on-load","canonical_anchor":"usage-stats-cache-is-sanitised-on-load","heading":"Usage-stats cache is sanitised on load","tier":"notice","area":"Usage & Limits","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.223\/e\/usage-stats-cache-is-sanitised-on-load","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.223","markdown":"### Usage-stats cache is sanitised on load\n\nA corrupted stats file no longer shows NaN in your usage and cost display.\n\n**What**\n\nA corrupt or partially written stats cache no longer produces NaN in the usage display.\n\n**Details**\n\n- After structural validation, the cache passes through a normaliser.\n- Every per-model counter is coerced to a number defaulting to 0: input and output tokens, cache reads, cache creation, web search requests, cost, context window and max output tokens.\n- Unrecognised model keys are dropped, as are hour buckets whose value is not numeric.\n- A cache that fails structural validation still returns empty.\n\n**Evidence**\n\n`Stats cache has invalid structure, returning empty cache`\n\n- Area: Usage & Limits\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 0\/5"}