From 2150ce2ce86f24d1e4937edab9db4ccd7e96ad9f Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Thu, 22 Sep 2022 11:51:56 +0800 Subject: [PATCH] Set TTL to 24 hours --- 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 5af829e30..a25af17bf 100644 --- a/packages/text-to-speech/src/index.ts +++ b/packages/text-to-speech/src/index.ts @@ -210,12 +210,12 @@ export const textToSpeechStreamingHandler = Sentry.GCPFunction.wrapHttpFunction( return res.status(500).send({ errorCode: 'SYNTHESIZER_ERROR' }) } const audioDataString = audioData.toString('hex') - // save audio data to cache for 12 hours + // save audio data to cache for 24 hours for mainly the newsletters await redisClient.set( cacheKey, JSON.stringify({ audioDataString, speechMarks }), { - EX: 3600 * 12, // in seconds + EX: 3600 * 24, // in seconds NX: true, } )