Api add flush cache timeout (#21413)

Signed-off-by: root <wenjun7j@gmail.com>
This commit is contained in:
SevenJ
2026-03-26 14:44:37 -07:00
committed by GitHub
parent 8c3ccef2d9
commit 2e65c27b29
6 changed files with 167 additions and 9 deletions
+9 -1
View File
@@ -185,7 +185,15 @@
"source": [
"## Flush Cache\n",
"\n",
"Flush the radix cache. It will be automatically triggered when the model weights are updated by the `/update_weights` API."
"Flush the radix cache. It will be automatically triggered when the model weights are updated by the `/update_weights` API.\n",
"\n",
"Parameters:\n",
"- `timeout` (query, float, default `0`, unit: seconds): Wait time for idle state before flushing. `0` means fail fast if not idle. When HiCache async operations are in-flight, a non-zero timeout allows the server to wait until idle before flushing, avoiding unnecessary 400 errors.\n",
"\n",
"```bash\n",
"# With timeout (wait up to 30s for idle state)\n",
"curl -s -X POST \"http://127.0.0.1:30000/flush_cache?timeout=30\"\n",
"```"
]
},
{