Store Set
Store Set is a Pipe for saving data to storage (MongoDB) by a given key. It supports specifying a time-to-live (TTL) after which the data is automatically deleted.
Parameters
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
key | string | Yes | — | The key by which the value is saved. Supports templating |
value | any | Yes | — | Data to save. Supports templating |
ttl | number | Yes | — | Record lifetime in seconds. The record is deleted after expiration |
table | string | No | "" | Virtual collection name (tag). Does not require additional database configuration |
Possible Errors
- Error processing the template in
params.key,params.value,params.table, orparams.ttl - Database query error
Example
{
"id": 37,
"type": "store_set",
"params": {
"key": "session_id",
"value": "$in.data.SessionInfo.%0.SessionToken",
"ttl": 900
},
"outs": {
"success": 12,
"error": 13
}
}