docs(ttl): the way to unset ttl

This commit is contained in:
Yicheng Qin 2014-04-14 11:03:56 -07:00
parent c8de5eee85
commit 1af51ca0c5

View File

@ -202,6 +202,32 @@ If the TTL has expired, the key will have been deleted, and you will be returned
}
```
The TTL could be unset to avoid expiration through update operation:
```sh
curl -L http://127.0.0.1:4001/v2/keys/foo -XPUT -d value=bar -d ttl= -d prevExist=true
```
```json
{
"action": "update",
"node": {
"createdIndex": 5,
"key": "/foo",
"modifiedIndex": 6,
"value": "bar"
}
"prevNode": {
"createdIndex": 5,
"expiration": "2013-12-04T12:01:21.874888581-08:00",
"key": "/foo",
"modifiedIndex": 5,
"ttl": 3,
"value": "bar"
}
}
```
### Waiting for a change