cache: wire rest get response caching

This commit is contained in:
a.tolmachev
2026-05-03 22:32:30 +00:00
parent 851d70ad7a
commit 284ba76b6b
9 changed files with 472 additions and 17 deletions
+5 -1
View File
@@ -54,7 +54,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
)
.await?;
let secret_crypto = SecretCrypto::new(&env::var("CRANK_MASTER_KEY")?)?;
let runtime = RuntimeExecutor::with_limits(runtime_limits);
let runtime = RuntimeExecutor::with_limits(runtime_limits)
.with_response_cache_store(cache_stores.response.clone());
let app = build_app(
registry,
refresh_interval,
@@ -3043,6 +3044,7 @@ mod tests {
execution_config: ExecutionConfig {
timeout_ms: 1_000,
retry_policy: None,
response_cache: None,
auth_profile_ref: None,
headers: BTreeMap::new(),
protocol_options: None,
@@ -3109,6 +3111,7 @@ mod tests {
execution_config: ExecutionConfig {
timeout_ms: 1_000,
retry_policy: None,
response_cache: None,
auth_profile_ref: None,
headers: BTreeMap::new(),
protocol_options: None,
@@ -3176,6 +3179,7 @@ mod tests {
execution_config: ExecutionConfig {
timeout_ms: 1_000,
retry_policy: None,
response_cache: None,
auth_profile_ref: None,
headers: BTreeMap::new(),
protocol_options: None,