diff options
Diffstat (limited to 'application/front/controller/visitor/DailyController.php')
-rw-r--r-- | application/front/controller/visitor/DailyController.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/application/front/controller/visitor/DailyController.php b/application/front/controller/visitor/DailyController.php index 5ae89299..29492a5f 100644 --- a/application/front/controller/visitor/DailyController.php +++ b/application/front/controller/visitor/DailyController.php | |||
@@ -86,9 +86,11 @@ class DailyController extends ShaarliVisitorController | |||
86 | public function rss(Request $request, Response $response): Response | 86 | public function rss(Request $request, Response $response): Response |
87 | { | 87 | { |
88 | $response = $response->withHeader('Content-Type', 'application/rss+xml; charset=utf-8'); | 88 | $response = $response->withHeader('Content-Type', 'application/rss+xml; charset=utf-8'); |
89 | $type = DailyPageHelper::extractRequestedType($request); | ||
90 | $cacheDuration = DailyPageHelper::getCacheDatePeriodByType($type); | ||
89 | 91 | ||
90 | $pageUrl = page_url($this->container->environment); | 92 | $pageUrl = page_url($this->container->environment); |
91 | $cache = $this->container->pageCacheManager->getCachePage($pageUrl); | 93 | $cache = $this->container->pageCacheManager->getCachePage($pageUrl, $cacheDuration); |
92 | 94 | ||
93 | $cached = $cache->cachedVersion(); | 95 | $cached = $cache->cachedVersion(); |
94 | if (!empty($cached)) { | 96 | if (!empty($cached)) { |
@@ -96,7 +98,6 @@ class DailyController extends ShaarliVisitorController | |||
96 | } | 98 | } |
97 | 99 | ||
98 | $days = []; | 100 | $days = []; |
99 | $type = DailyPageHelper::extractRequestedType($request); | ||
100 | $format = DailyPageHelper::getFormatByType($type); | 101 | $format = DailyPageHelper::getFormatByType($type); |
101 | $length = DailyPageHelper::getRssLengthByType($type); | 102 | $length = DailyPageHelper::getRssLengthByType($type); |
102 | foreach ($this->container->bookmarkService->search() as $bookmark) { | 103 | foreach ($this->container->bookmarkService->search() as $bookmark) { |