set
Store a Redis string value with an optional expiration time by specifying a key and value. Confirms successful storage or returns an error message.
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 |
---|---|---|---|
expiration | No | ||
key | Yes | ||
value | Yes |
Input Schema (JSON Schema)
{
"properties": {
"expiration": {
"default": null,
"title": "Expiration",
"type": "integer"
},
"key": {
"title": "Key",
"type": "string"
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"format": "binary",
"type": "string"
},
{
"type": "integer"
},
{
"type": "number"
},
{
"type": "object"
}
],
"title": "Value"
}
},
"required": [
"key",
"value"
],
"title": "setArguments",
"type": "object"
}