touch method
Updates the expiry on an existing document.
Implementation
Future<MutationResult> touch(
String key,
Duration expiry, [
TouchOptions? options,
]) async {
// TODO: Check why durabilityLevel is not used
options ??= const TouchOptions();
final response = await _connection.touch(
TouchRequest(
id: _documentId(key),
expiry: expiry.inSeconds,
timeout: _kvTimeout(options),
partition: 0,
opaque: 0,
),
);
return MutationResult(
cas: response.cas,
token: null,
);
}