From 5ec5916cc87cb15857f73420258cfd56cc0e0e5d Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Thu, 7 Sep 2023 14:01:31 +0800 Subject: [PATCH] Increase cache time for text to speech data --- packages/text-to-speech/src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/text-to-speech/src/index.ts b/packages/text-to-speech/src/index.ts index 821611ffb..992111ef7 100644 --- a/packages/text-to-speech/src/index.ts +++ b/packages/text-to-speech/src/index.ts @@ -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, } )