Skip to content

Commit 246b71e

Browse files
committed
editoast: revert valkey compression
1 parent 193d4b6 commit 246b71e

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

editoast/src/views/path/pathfinding.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ async fn pathfinding_blocks_batch(
245245

246246
// Try to retrieve the result from Valkey
247247
let pathfinding_cached_results: Vec<Option<PathfindingResult>> =
248-
valkey_conn.compressed_get_bulk(&hashes).await?;
248+
valkey_conn.json_get_bulk(&hashes).await?;
249249
let pathfinding_cached_results: HashMap<_, _> =
250250
hashes.into_iter().zip(pathfinding_cached_results).collect();
251251

@@ -325,7 +325,7 @@ async fn pathfinding_blocks_batch(
325325
}
326326

327327
debug!(nb_cached = to_cache.len(), "Caching pathfinding response");
328-
valkey_conn.compressed_set_bulk(&to_cache).await?;
328+
valkey_conn.json_set_bulk(&to_cache).await?;
329329

330330
Ok(pathfinding_results)
331331
}

editoast/src/views/train_schedule.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -526,9 +526,8 @@ pub async fn consist_train_simulation_batch(
526526
nb_unique_sim = to_sim.len()
527527
);
528528
let cached_simulation_hash = to_sim.keys().collect::<Vec<_>>();
529-
let cached_results: Vec<Option<SimulationResponse>> = valkey_conn
530-
.compressed_get_bulk(&cached_simulation_hash)
531-
.await?;
529+
let cached_results: Vec<Option<SimulationResponse>> =
530+
valkey_conn.json_get_bulk(&cached_simulation_hash).await?;
532531

533532
let nb_hit = cached_results.iter().flatten().count();
534533
let nb_miss = to_sim.len() - nb_hit;
@@ -574,7 +573,7 @@ pub async fn consist_train_simulation_batch(
574573
}
575574

576575
// Cache the simulation response
577-
valkey_conn.compressed_set_bulk(&to_cache).await?;
576+
valkey_conn.json_set_bulk(&to_cache).await?;
578577

579578
// Return the response
580579
Ok(simulation_results

0 commit comments

Comments
 (0)