diff --git a/Cargo.lock b/Cargo.lock
index c244cd4..e0ed956 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -903,6 +903,7 @@ dependencies = [
"redis",
"serde",
"serde_json",
+ "tokio",
]
[[package]]
diff --git a/Cargo.toml b/Cargo.toml
index 7601447..6c6420b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -29,6 +29,8 @@ pow_sha256 = { version = "0.2.1", git = "https://github.com/mcaptcha/pow_sha256"
#redis = { version = "0.20.1", features = ["tokio-comp","aio", "cluster"], optional=true }
redis = { version = "0.17.0", features = ["tokio-comp","aio", "cluster"], optional=true }
+tokio = { version = "0.2.25", features = ["sync"]}
+
[dev-dependencies]
actix-rt = "1"
diff --git a/src/cache/hashcache.rs b/src/cache/hashcache.rs
index 1d857ee..9055d5c 100644
--- a/src/cache/hashcache.rs
+++ b/src/cache/hashcache.rs
@@ -19,6 +19,7 @@
use std::collections::HashMap;
use actix::prelude::*;
+use tokio::sync::oneshot;
use super::messages::*;
use super::Save;
@@ -46,8 +47,11 @@ impl HashCache {
}
// retrive [PoWConfig] from cache. Deletes config post retrival
- fn retrive_pow_config(&mut self, string: String) -> CaptchaResult