Modify or clear a document's expiration time.
Couchbase allows documents to contain expiration times (see lcb_CMDBASE::exptime). Most operations allow the expiry time to be updated, however lcb_touch3() allows the exclusive update of the expiration time without additional network overhead.
Spool a touch request.
- Stability
- Committed:
- Parameters
-
instance | the handle |
cookie | the pointer to associate with the request |
cmd | the command |
- Returns
- LCB_SUCCESS on success, other error code on failure
- Request
- Response
{
printf("Touch succeeded\n");
}
}
Command structure for a touch request.
- Note
- The lcb_CMDTOUCH::cas field is ignored. The item's modification time is always updated regardless if the CAS on the server differs. The #exptime field is always used. If 0 then the expiry on the server is cleared.
Response structure for a touch request.
- Note
- the lcb_RESPTOUCH::cas field contains the current CAS of the item