AddKey
Redis Plugin – Add Key
Summary (SEO Meta Description):
The Redis plugin in WeHub allows workflows to add key-value pairs into a Redis store.
Use this action to cache workflow data or share state between nodes.
Overview
The Add Key action writes a key-value pair into a Redis database.
It is typically used for caching, temporary data storage, and fast lookups inside workflows.
⚙️ Action: Add Key
- Description: Adds a key-value pair to Redis.
- Use Case: Store workflow output or session data for fast retrieval.
Configuration Options:
| Field | Type | Description | 
|---|---|---|
| Label | String | Custom name for the action. | 
| Select Connection | Connection | Choose or create a Redis connection. | 
| Key | String | The Redis key to be stored. | 
| Value | Any | The value to store under the given key (string, number, object, etc.). | 
| TTL (Optional) | Number | Time-to-live in seconds. After TTL expires, the key is automatically removed. | 
💡 Example Use Cases
- Healthcare: Cache patient session data for quick lookup during workflow execution.
- E-commerce: Store temporary shopping cart data keyed by session ID.
- Microservices: Share state between different workflow executions using Redis.
FAQ
Q: What happens if the key already exists?
A: By default, the existing value will be overwritten.
Q: Can I store complex objects in Redis?
A: Yes. JSON objects can be stored as strings, which can then be parsed back when retrieved.
Q: Do I need to set a TTL?
A: No. TTL is optional. Without it, the key will persist until explicitly deleted.
Keywords: WeHub Redis Plugin, Add Key, Redis Cache, Key-Value Store, Workflow State Management