module documentation
Task result cache for continue-as-new support.
Caches task results by (module.qualname, args, kwargs) hash so that previously completed tasks are not re-executed after a continue-as-new. The cache state is a plain dict that can travel through workflow.continue_as_new().
| Function | cache |
Build a cache key from the full task identifier, arguments, and runtime context. |
| Function | cache |
Return (True, value) if cached, (False, None) otherwise. |
| Function | cache |
Store a value in the task result cache. |
| Function | get |
Get the task result cache for the current context. |
| Function | set |
Set the task result cache for the current context. |
| Function | task |
Return the fully-qualified module.qualname for a function. |
| Variable | _task |
Undocumented |
def cache_key(task_id:
str, args: tuple[ Any, ...], kwargs: dict[ str, Any], context: Any = None) -> str:
(source)
¶
Build a cache key from the full task identifier, arguments, and runtime context.