Increase cache time for text to speech data

This commit is contained in:
Jackson Harper 2023-09-07 14:01:31 +08:00
parent f7e5a8cbfd
commit 5ec5916cc8

View file

@ -347,12 +347,12 @@ export const textToSpeechStreamingHandler = Sentry.GCPFunction.wrapHttpFunction(
}
const audioDataString = audioData.toString('hex')
// save audio data to cache for 24 hours for mainly the newsletters
// save audio data to cache for 72 hours for mainly the newsletters
await redisClient.set(
cacheKey,
JSON.stringify({ audioDataString, speechMarks }),
{
EX: 3600 * 24, // in seconds
EX: 3600 * 72, // in seconds
NX: true,
}
)