Switching Redis TTL from EX to PX to match TTL in milliseconds (as specified in the input param).
This commit is contained in:
parent
e72d9e4094
commit
63665b37ce
|
|
@ -131,7 +131,7 @@ class RedisCache implements INode {
|
|||
for (let i = 0; i < value.length; i += 1) {
|
||||
const key = getCacheKey(prompt, llmKey, String(i))
|
||||
if (ttl) {
|
||||
await client.set(key, JSON.stringify(serializeGeneration(value[i])), 'EX', parseInt(ttl, 10))
|
||||
await client.set(key, JSON.stringify(serializeGeneration(value[i])), 'PX', parseInt(ttl, 10))
|
||||
} else {
|
||||
await client.set(key, JSON.stringify(serializeGeneration(value[i])))
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue