diff --git a/limitador/src/storage/redis/redis_async.rs b/limitador/src/storage/redis/redis_async.rs index fca8964f..fa60af81 100644 --- a/limitador/src/storage/redis/redis_async.rs +++ b/limitador/src/storage/redis/redis_async.rs @@ -113,6 +113,7 @@ impl AsyncCounterStorage for AsyncRedisStorage { } let script = redis::Script::new(SCRIPT_UPDATE_COUNTER); + script.prepare_invoke().load_async(&mut con).await?; let mut pipeline = redis::pipe(); let mut pipeline = &mut pipeline; for (counter_idx, key) in counter_keys.iter().enumerate() { @@ -125,7 +126,7 @@ impl AsyncCounterStorage for AsyncRedisStorage { .arg(counter.window().as_secs()) .arg(delta), ) - .ignore(); + .ignore() } pipeline .query_async::<()>(&mut con)