Skip to content

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

chore: remove unused cache module

Steven Enamakel6258eee6dd90
diff --git a/crates/openhuman-session/src/cache.rs b/crates/openhuman-session/src/cache.rs
index d8fc581329..c728da7dea 100644
--- a/crates/openhuman-session/src/cache.rs
+++ b/crates/openhuman-session/src/cache.rs
@@ -267,14 +267,8 @@ impl CurrentUserCache {
let generation = self.lock().generation;
if !force {
- // A rejection is authoritative regardless of what else is cached:
- // a stale-while-revalidate caller cannot observe a background
- // rejection directly, so it must be surfaced now rather than
- // served through on a positive entry that predates it.
- if let Some((error, _, _)) = self.suppressed(&key) {
- if matches!(error, FetchMeError::Rejected(_)) {
- return Err(error);
- }
+ if let Some(error) = self.suppressed_error(&key) {
+ return Err(error);
}
if let Some((user, age)) = self.cached(&key) {
if age < REFRESH_TTL {
@@ -287,13 +281,6 @@ impl CurrentUserCache {
);
return Ok(self.with_result(&key, Some(user)));
}
- // No positive entry to fall back on: only now does an open
- // availability-backoff window turn into an error, instead of
- // pre-empting perfectly good cached data for the whole window
- // (#6318 review follow-up).
- if let Some(error) = self.suppressed_error(&key) {
- return Err(error);
- }
}
// The first caller owns the network refresh. Concurrent cache misses