Cache
Category: Data
Node id: cache
In-memory key-value cache with TTL expiration for pipeline data
What it does
- Six cache operations: get, set, delete, exists, clear, stats
- TTL-based expiration with automatic cleanup goroutine
- Thread-safe concurrent access with RWMutex
- Cache statistics reporting (active, expired, total entries)
Use cases
- Cache FHIR terminology lookups to avoid repeated API calls
- Store intermediate pipeline results for reuse across steps
- Deduplicate repeated requests within a pipeline execution
Runtime
- Performance tier:
fast
Input ports
| Name | Type | Required | Description |
|---|---|---|---|
key | text | No | Cache key (overrides config) |
value | any | No | Value to store (for set operation) |
ttl | number | No | TTL override in seconds (for set operation) |
Output ports
| Name | Type | Required | Description |
|---|---|---|---|
result | json | No | Full cache operation result with key, hit status, and metadata |
value | any | No | Retrieved value (for get operation) |
success | boolean | No | Whether the cache operation succeeded |
Settings
Basic
| Setting | Name | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|---|
| Operation | operation | enum | Yes | get | get, set, delete, exists, clear, stats | Cache operation to perform |
| Key | key | string | No | Cache key | ||
| TTL (seconds) | ttl | number | No | 3600 | min 1 | Time to live in seconds for set operation |
Errors
| Code | Description |
|---|---|
MISSING_KEY | Cache key is required for get, set, delete, and exists operations |
MISSING_VALUE | Value is required for set operation |
UNSUPPORTED_OPERATION | The specified cache operation is not recognized |
Runtime notes
- On cache miss, result.hit is false and value is null — wire both outputs to handle miss vs hit in downstream logic
- value output is null for all operations except get — do not wire it for set, delete, exists, clear, or stats
- Cache is in-memory per node instance and does not persist across pipeline restarts
- Expired entries return hit=false; a background goroutine cleans up expired entries every 5 minutes
See Build any workflow for how to put nodes together and Ports, types and data flow for how port types connect.
Etwas unklar? Senden Sie Feedback zur Dokumentation per E-Mail..