feat(redis): preserve TTL when updating values

This commit is contained in:
二丫讲梵 authored and GitHub committed 2026-07-14 23:07:52 +08:00
1 parent 4e3c705f9c
commit c1bda3be87
2 files changed
+126 -9

No files matched your search

@@ -786,7 +786,7 @@ async function createRedisKey() {
if (createKeyType.value === "string" || createKeyType.value === "json" || createKeyRawMode.value) {
// Raw text/JSON mode — single value
if (createKeyType.value === "string") {
await api.redisSetString(props.connectionId, props.db, keyRaw, createKeyValue.value, ttl);
await api.redisSetString(props.connectionId, props.db, keyRaw, createKeyValue.value, ttl ?? -1);
} else if (createKeyType.value === "json") {
await api.redisJsonSet(props.connectionId, props.db, keyRaw, createKeyValue.value, ttl);
} else if (createKeyType.value === "hash") {