MCPcopy Create free account
hub / github.com/asymptotic-code/sui-prover / check_cache

Method check_cache

crates/lambda-boogie-handler/handler.rs:69–86  ·  view source on GitHub ↗
(&self, hash: &str)

Source from the content-addressed store, hash-verified

67 }
68
69 async fn check_cache(&self, hash: &str) -> Result<Option<(String, String, i32)>> {
70 if let Some(redis_client) = &self.redis_client {
71 let mut conn = redis_client
72 .get_multiplexed_async_connection()
73 .await
74 .context("Failed to get Redis connection")?;
75
76 let result: Option<String> = conn.get(hash).await?;
77 let deserialized: Option<(String, String, i32)> = match result {
78 Some(data) => serde_json::from_str(&data).ok(),
79 None => None,
80 };
81
82 Ok(deserialized)
83 } else {
84 Ok(None)
85 }
86 }
87
88 async fn cache_result(&self, hash: &str, out: &str, err: &str, status: i32) -> Result<()> {
89 if let Some(redis_client) = &self.redis_client {

Callers 1

processMethod · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected