diff options
Diffstat (limited to 'server/middlewares/cache.ts')
-rw-r--r-- | server/middlewares/cache.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/server/middlewares/cache.ts b/server/middlewares/cache.ts index cb24d9e0e..0708ee8e8 100644 --- a/server/middlewares/cache.ts +++ b/server/middlewares/cache.ts | |||
@@ -1,5 +1,6 @@ | |||
1 | import { Redis } from '../lib/redis' | 1 | import { Redis } from '../lib/redis' |
2 | import * as apicache from 'apicache' | 2 | import * as apicache from 'apicache' |
3 | import { HttpStatusCode } from '../../shared/core-utils/miscs/http-error-codes' | ||
3 | 4 | ||
4 | // Ensure Redis is initialized | 5 | // Ensure Redis is initialized |
5 | Redis.Instance.init() | 6 | Redis.Instance.init() |
@@ -8,7 +9,10 @@ const defaultOptions = { | |||
8 | redisClient: Redis.Instance.getClient(), | 9 | redisClient: Redis.Instance.getClient(), |
9 | appendKey: () => Redis.Instance.getPrefix(), | 10 | appendKey: () => Redis.Instance.getPrefix(), |
10 | statusCodes: { | 11 | statusCodes: { |
11 | exclude: [ 404, 403 ] | 12 | exclude: [ |
13 | HttpStatusCode.FORBIDDEN_403, | ||
14 | HttpStatusCode.NOT_FOUND_404 | ||
15 | ] | ||
12 | } | 16 | } |
13 | } | 17 | } |
14 | 18 | ||