feat: cache media proxy data in redis for 30 mins

This commit is contained in:
httpjamesm
2022-10-31 17:28:18 -04:00
parent 59a314b2bd
commit 2c8d138cbd
3 changed files with 34 additions and 13 deletions

11
src/utils/redis.ts Normal file
View File

@ -0,0 +1,11 @@
import Redis from 'ioredis'
const redisUrl = process.env.REDIS_URL
if (!redisUrl) {
throw 'Please set the REDIS_URL environment variable.'
}
const redis = new Redis(redisUrl)
export default redis