Where
- `ttymap-tui/src/lua/api/http.rs:76` (`LuaJob::spawn` cache logic)
- `ttymap-engine/src/map/tile/fetch/disk_cached.rs`
What
The "TTL check → disk-immediate-return → fetch → write-through → stale fallback on error" sequence in `LuaJob::spawn` (~50 lines) speaks the same vocabulary as engine's `DiskCachedFetcher` decorator.
Proposal
Pull the cache-decision into a `HttpClient::get_cached(url, ttl)` (or similar) on the engine side. `LuaJob::spawn` keeps only thread + channel wiring.
Where
What
The "TTL check → disk-immediate-return → fetch → write-through → stale fallback on error" sequence in `LuaJob::spawn` (~50 lines) speaks the same vocabulary as engine's `DiskCachedFetcher` decorator.
Proposal
Pull the cache-decision into a `HttpClient::get_cached(url, ttl)` (or similar) on the engine side. `LuaJob::spawn` keeps only thread + channel wiring.