parquet_optimized_cache_key

Function parquet_optimized_cache_key 

Source
pub(crate) fn parquet_optimized_cache_key(cache_key: &str) -> String
Expand description

Build the optimized-Parquet body cache key for a given file cache key.

POST /api/v1/parse/parquet/optimized was added without a key of its own, so its response had nowhere to be stored and every request re-parsed the file while the flat route beside it replayed from disk (issue #3889). This is that key.

Deliberately a DIFFERENT namespace from -parquet-v9: the two routes emit different payloads (quantized vertices, deduplicated shapes, byte colours), so a hit on one must never satisfy the other.

v1 is the ara3d BOS payload as it stands after #3595 (rotation-aware instancing). Bump on EVERY change to the optimized payload’s columns, to what one of them means, OR to the geometry pipeline behind them – this key covers process_geometry_filtered_with_quality output just as parquet_cache_key does, and that key’s own v3 -> v4 bump was a pipeline change with no column change at all. In practice: a bump of -parquet-v9 almost always needs a bump here too. Otherwise a warm cache replays a pre-change blob that the decoder reads cleanly, and the change is silently absent.

v2 with #5130: MeshGeometryKey gained normals_hash. The pipeline derives normals from positions and indices, so no optimized payload is expected to change – bumped under this key’s own rule (every change to the dedup behind the payload) rather than on that invariant, at the cost of one re-parse per warm file.