aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/redis.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/redis.ts')
-rw-r--r--server/lib/redis.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/lib/redis.ts b/server/lib/redis.ts
index 1e7c0a821..0acb9ff0e 100644
--- a/server/lib/redis.ts
+++ b/server/lib/redis.ts
@@ -2,7 +2,7 @@ import * as express from 'express'
2import { createClient, RedisClient } from 'redis' 2import { createClient, RedisClient } from 'redis'
3import { logger } from '../helpers/logger' 3import { logger } from '../helpers/logger'
4import { generateRandomString } from '../helpers/utils' 4import { generateRandomString } from '../helpers/utils'
5import { CONFIG, FEEDS, USER_PASSWORD_RESET_LIFETIME, VIDEO_VIEW_LIFETIME } from '../initializers' 5import { CONFIG, USER_PASSWORD_RESET_LIFETIME, VIDEO_VIEW_LIFETIME } from '../initializers'
6 6
7type CachedRoute = { 7type CachedRoute = {
8 body: string, 8 body: string,
@@ -67,14 +67,14 @@ class Redis {
67 return cached as CachedRoute 67 return cached as CachedRoute
68 } 68 }
69 69
70 setCachedRoute (req: express.Request, body: any, contentType?: string, statusCode?: number) { 70 setCachedRoute (req: express.Request, body: any, lifetime: number, contentType?: string, statusCode?: number) {
71 const cached: CachedRoute = { 71 const cached: CachedRoute = {
72 body: body.toString(), 72 body: body.toString(),
73 contentType, 73 contentType,
74 statusCode: statusCode.toString() 74 statusCode: statusCode.toString()
75 } 75 }
76 76
77 return this.setObject(this.buildCachedRouteKey(req), cached, FEEDS.CACHE_LIFETIME) 77 return this.setObject(this.buildCachedRouteKey(req), cached, lifetime)
78 } 78 }
79 79
80 listJobs (jobsPrefix: string, state: string, mode: 'alpha', order: 'ASC' | 'DESC', offset: number, count: number) { 80 listJobs (jobsPrefix: string, state: string, mode: 'alpha', order: 'ASC' | 'DESC', offset: number, count: number) {