fix: address review feedback
This commit is contained in:
1 parent
ac7e3f2ef4
commit
5ac4a4cffc
3 files changed
+32
-5
No files matched your search
@@ -140,7 +140,11 @@ export const createGetSetChannel = <TData>(name: string, options: RedisChannelOp
|
||||
await requireRedisConnection(client).set(name, superjson.stringify(data), "PX", options.ttlMs);
|
||||
return;
|
||||
}
|
||||
if (options?.ttlSeconds) {
|
||||
if (options?.ttlSeconds !== undefined) {
|
||||
if (options.ttlSeconds <= 0) {
|
||||
await requireRedisConnection(client).del(name);
|
||||
return;
|
||||
}
|
||||
await requireRedisConnection(client).set(name, superjson.stringify(data), "EX", options.ttlSeconds);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user