aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/feeds.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-05-11 09:44:04 +0200
committerChocobozzz <me@florianbigard.com>2018-05-11 15:24:17 +0200
commitfd4484f19eae8b0a0c30d5d30e98880c8708516a (patch)
tree9dcb357413c84797b79e301fb843b1695e20d902 /server/controllers/feeds.ts
parent8a2db2e8cb67f7f802ecb35be7b9154695f1a6ec (diff)
downloadPeerTube-fd4484f19eae8b0a0c30d5d30e98880c8708516a.tar.gz
PeerTube-fd4484f19eae8b0a0c30d5d30e98880c8708516a.tar.zst
PeerTube-fd4484f19eae8b0a0c30d5d30e98880c8708516a.zip
Cache AP video route for 5 seconds
Diffstat (limited to 'server/controllers/feeds.ts')
-rw-r--r--server/controllers/feeds.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/feeds.ts b/server/controllers/feeds.ts
index 08f179509..92cf85050 100644
--- a/server/controllers/feeds.ts
+++ b/server/controllers/feeds.ts
@@ -1,5 +1,5 @@
1import * as express from 'express' 1import * as express from 'express'
2import { CONFIG, FEEDS } from '../initializers/constants' 2import { CONFIG, FEEDS, ROUTE_CACHE_LIFETIME } from '../initializers/constants'
3import { asyncMiddleware, feedsValidator, setDefaultSort, videosSortValidator } from '../middlewares' 3import { asyncMiddleware, feedsValidator, setDefaultSort, videosSortValidator } from '../middlewares'
4import { VideoModel } from '../models/video/video' 4import { VideoModel } from '../models/video/video'
5import * as Feed from 'pfeed' 5import * as Feed from 'pfeed'
@@ -12,8 +12,8 @@ const feedsRouter = express.Router()
12feedsRouter.get('/feeds/videos.:format', 12feedsRouter.get('/feeds/videos.:format',
13 videosSortValidator, 13 videosSortValidator,
14 setDefaultSort, 14 setDefaultSort,
15 asyncMiddleware(cacheRoute(ROUTE_CACHE_LIFETIME.FEEDS)),
15 asyncMiddleware(feedsValidator), 16 asyncMiddleware(feedsValidator),
16 asyncMiddleware(cacheRoute),
17 asyncMiddleware(generateFeed) 17 asyncMiddleware(generateFeed)
18) 18)
19 19