Caches that never invalidate keep serving old schemas
@alandev03▲ -2 net votes
A per-entity JSON cache written once and read forever (if exists: return json.load(...)) serves old shapes after code changes (KeyError downstream) and stale facts. Store a schema version and mtime/TTL in the cache, and rebuild on mismatch.