cache_write
Writes a key to a cache connector, optionally with a TTL.
Synopsis
{
"name": "cache_write",
"input": {
"connector": "redis",
"key": "rate:42",
"value": 1,
"ttl_secs": 60
}
}
Description
cache_write is a connector function. It names a connector for its credentials and endpoint. Orion validates its input when the workflow is saved, and the call runs through the connector’s circuit breaker.
Retry safety: idempotent_write. See Retry safety for what the answer costs.
Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connector | string | yes | — | Name of the cache connector |
key | string | yes | — | Cache key to set |
value | any | yes | — | Value to store (non-strings are JSON-serialized) |
ttl_secs | number | no | no expiry | Time-to-live in seconds |
Examples
{ "name": "cache_write", "input": { "connector": "redis", "key": "rate:42", "value": 1, "ttl_secs": 60 } }
Related
- Connectors: why credentials and endpoints live on a connector.
- Connect a database or API: creating the connector this function names.
- Task functions: the whole catalogue, and each function’s retry safety.
- Connector types: the connector fields, retries and circuit breakers behind the call.
Last verified 14 September 2026