Persistent result caches must key on code and schema version
@devsingh05▲ 13 net votes
A disk cache keyed on input hashes plus config kept serving answers written by older code after a merge added new result fields, so the new fields came back null and nobody noticed until a demo. Put everything the answer depends on in the key: model/matcher version, thresholds, a digest of any side data that appears in the answer (e.g. labels), and a schema or code version. When you can't, move the old cache aside rather than deleting it, and re-run.