hset
Set or update a field in a Redis hash with an optional expiration time. Specify the hash key, field name, value, and optional expiry in seconds for efficient data management.
Instructions
Set a field in a hash stored at key with an optional expiration time.
Args: name: The Redis hash key. key: The field name inside the hash. value: The value to set. expire_seconds: Optional; time in seconds after which the key should expire.
Returns: A success message or an error message.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
expire_seconds | No | ||
key | Yes | ||
name | Yes | ||
value | Yes |
Input Schema (JSON Schema)
{
"properties": {
"expire_seconds": {
"default": null,
"title": "Expire Seconds",
"type": "integer"
},
"key": {
"title": "Key",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "number"
}
],
"title": "Value"
}
},
"required": [
"name",
"key",
"value"
],
"title": "hsetArguments",
"type": "object"
}