mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 23:01:09 +03:00
Merge pull request #1338 from FlowiseAI/bugfix/RedisCache
Bugfix/Redis Cache Error
This commit is contained in:
@@ -89,7 +89,7 @@ class RedisCache implements INode {
|
|||||||
redisClient.update = async (prompt: string, llmKey: string, value: Generation[]) => {
|
redisClient.update = async (prompt: string, llmKey: string, value: Generation[]) => {
|
||||||
for (let i = 0; i < value.length; i += 1) {
|
for (let i = 0; i < value.length; i += 1) {
|
||||||
const key = getCacheKey(prompt, llmKey, String(i))
|
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))
|
await client.set(key, JSON.stringify(serializeGeneration(value[i])), 'EX', parseInt(ttl, 10))
|
||||||
} else {
|
} else {
|
||||||
await client.set(key, JSON.stringify(serializeGeneration(value[i])))
|
await client.set(key, JSON.stringify(serializeGeneration(value[i])))
|
||||||
|
|||||||
Reference in New Issue
Block a user