set
Store a key-value pair in Redis with an optional expiration time to control data persistence.
Instructions
Set a Redis string value with an optional expiration time.
Args: key (str): The key to set. value (str, bytes, int, float, dict): The value to store. expiration (int, optional): Expiration time in seconds.
Returns: str: Confirmation message or an error message.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | ||
| value | Yes | ||
| expiration | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |