Merge pull request #1338 from FlowiseAI/bugfix/RedisCache

Bugfix/Redis Cache Error
This commit is contained in:
Henry Heng
2023-12-06 12:27:40 +00:00
committed by GitHub
+1 -1
View File
@@ -89,7 +89,7 @@ class RedisCache implements INode {
redisClient.update = async (prompt: string, llmKey: string, value: Generation[]) => {
for (let i = 0; i < value.length; i += 1) {
const key = getCacheKey(prompt, llmKey, String(i))
if (ttl !== undefined) {
if (ttl) {
await client.set(key, JSON.stringify(serializeGeneration(value[i])), 'EX', parseInt(ttl, 10))
} else {
await client.set(key, JSON.stringify(serializeGeneration(value[i])))