Store the base payload for a run id using Vercel Runtime Cache.
(run_id: str, payload: dict[str, Any])
| 19 | |
| 20 | |
| 21 | async def set_run_payload(run_id: str, payload: dict[str, Any]) -> None: |
| 22 | """Store the base payload for a run id using Vercel Runtime Cache.""" |
| 23 | await cache.set( |
| 24 | _cache_key(run_id), |
| 25 | dict(payload), |
| 26 | {"ttl": _TTL_SECONDS, "tags": [f"run:{run_id}"]}, |
| 27 | ) |
| 28 | |
| 29 | |
| 30 | async def get_run_payload(run_id: str) -> dict[str, Any] | None: |
no test coverage detected