Remove Store::cached(), consolidate on access_local()

- Remove CACHED_STORE, cached(), is_stale(), set_store() - redundant
- Convert all Store::cached() callers to use access_local()
- Single Store::load() call remains in access() fallback path

All store access now goes through hippocampus::access() / access_local(),
which handles socket connection or local fallback with caching.

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
Kent Overstreet 2026-04-13 18:11:58 -04:00
parent 09b30d64f2
commit 1d88293ccf
6 changed files with 17 additions and 51 deletions

View file

@ -526,8 +526,8 @@ impl Subconscious {
.collect()
};
let store = crate::store::Store::cached().await.ok();
let store_guard = match &store {
let store_arc = crate::hippocampus::access_local().ok();
let store_guard = match &store_arc {
Some(s) => Some(s.lock().await),
None => None,
};
@ -604,8 +604,8 @@ impl Subconscious {
if to_run.is_empty() { return; }
// Query each agent's recent writes so they know what they already touched
let store = crate::store::Store::cached().await.ok();
let store_guard = match &store {
let store_arc = crate::hippocampus::access_local().ok();
let store_guard = match &store_arc {
Some(s) => Some(s.lock().await),
None => None,
};