feat: cache media proxy data in redis for 30 mins
This commit is contained in:
11
src/utils/redis.ts
Normal file
11
src/utils/redis.ts
Normal 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
|
Reference in New Issue
Block a user