Get Expire
Gets the expiration date of a key.
- Parameters:
key
: The key to check.
- Returns:
- The result of the operation, includes the expiration date of the key or an error if the operation failed.
const result = db.getExpire("session:5678");
if (result.success) {
console.log(`Expiration date: ${result.data}`);
} else {
console.log(result.error.message);
}