encodeInt method

bool encodeInt(
  1. String key,
  2. int value, [
  3. int? expireDurationInSecond
])

expireDurationInSecond override the default duration setting from enableAutoKeyExpire().

Implementation

bool encodeInt(String key, int value, [int? expireDurationInSecond]) {
  final keyPtr = key.toNativeUtf8();
  final ret =
      (expireDurationInSecond == null) ? _encodeInt64(_handle, keyPtr, value) : _encodeInt64V2(_handle, keyPtr, value, expireDurationInSecond);
  calloc.free(keyPtr);
  return _int2Bool(ret);
}