IO proxy: client-side cache with 5min TTL, server Cache-Control
Client caches IO results by (name + args) in memory. In-flight promises are cached too (dedup concurrent calls for same args). Server adds Cache-Control: public, max-age=300 for HTTP caching. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -601,6 +601,7 @@ def mount_io_endpoint(app: Any, service_name: str) -> None:
|
||||
result_sx = serialize(result) if result is not None else "nil"
|
||||
resp = await make_response(result_sx, 200)
|
||||
resp.content_type = "text/sx; charset=utf-8"
|
||||
resp.headers["Cache-Control"] = "public, max-age=300"
|
||||
return resp
|
||||
|
||||
io_proxy.__name__ = "sx_io_proxy"
|
||||
|
||||
Reference in New Issue
Block a user