A deploy that changed a serialised shape needed every cached entry invalidated, and the tool for that had been FLUSHDB.
// the key
$key = sprintf('v%d:order:%d', self::CACHE_VERSION, $id);
// bump the constant, and every old key is unreachable
private const CACHE_VERSION = 4;
// old entries expire on their own TTL. no flush, no
// thundering herd, no cache that is empty for everything
// including the things that did not change.
Flushing invalidates everything, including the ninety per cent of entries whose shape did not change, and the resulting stampede is worse than the stale data would have been. Version-prefixing costs a little memory during the overlap and the entries disappear on their own. The constant belongs next to the class whose shape it tracks, or nobody will remember to bump it.