Client-side LRU cache for Bio data, purely for rendering performance.
The authoritative bios are stored in BUCKET_BIO on the Rust/WASM side.
Every PostPanel, mention popup, etc. needs the author's bio to render,
and crossing the WASM bridge for each one is expensive. This cache
keeps up to 512 recently-seen bios in JS memory with a 60-second TTL,
so most renders hit the cache instead of making a WASM round-trip.
When the local user updates their own bio, call flush_cached_bio()
to invalidate the stale JS entry so the next read re-fetches from WASM.
Client-side LRU cache for Bio data, purely for rendering performance.
The authoritative bios are stored in BUCKET_BIO on the Rust/WASM side. Every PostPanel, mention popup, etc. needs the author's bio to render, and crossing the WASM bridge for each one is expensive. This cache keeps up to 512 recently-seen bios in JS memory with a 60-second TTL, so most renders hit the cache instead of making a WASM round-trip.
When the local user updates their own bio, call
flush_cached_bio()to invalidate the stale JS entry so the next read re-fetches from WASM.