Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

feat(cache): add serialization support to CachedUser

Steven Enamakeld1ef620d89af
diff --git a/crates/openhuman-session/src/cache.rs b/crates/openhuman-session/src/cache.rs
index 69992838f5..9f68236e1e 100644
--- a/crates/openhuman-session/src/cache.rs
+++ b/crates/openhuman-session/src/cache.rs
@@ -63,7 +63,8 @@ pub fn backoff_for(consecutive: u32, fetch_timeout: Duration) -> Duration {
/// What the cache hands back: the user (if the backend returned one) and
/// how stale the data being served is.
-#[derive(Debug, Clone, PartialEq, Eq)]
+#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize)]
+#[serde(rename_all = "camelCase")]
pub struct CachedUser {
pub user: Option<Value>,
/// The backend could not refresh this identity recently.