public function rss(Request $request, Response $response): Response
{
$response = $response->withHeader('Content-Type', 'application/rss+xml; charset=utf-8');
+ $type = DailyPageHelper::extractRequestedType($request);
+ $cacheDuration = DailyPageHelper::getCacheDatePeriodByType($type);
$pageUrl = page_url($this->container->environment);
- $cache = $this->container->pageCacheManager->getCachePage($pageUrl);
+ $cache = $this->container->pageCacheManager->getCachePage($pageUrl, $cacheDuration);
$cached = $cache->cachedVersion();
if (!empty($cached)) {
}
$days = [];
- $type = DailyPageHelper::extractRequestedType($request);
$format = DailyPageHelper::getFormatByType($type);
$length = DailyPageHelper::getRssLengthByType($type);
foreach ($this->container->bookmarkService->search() as $bookmark) {
$dataPerDay[$day] = [
'date' => $endDateTime,
'date_rss' => $endDateTime->format(DateTime::RSS),
- 'date_human' => DailyPageHelper::getDescriptionByType($type, $dayDateTime),
- 'absolute_url' => $indexUrl . 'daily?'. $type .'=' . $day,
+ 'date_human' => DailyPageHelper::getDescriptionByType($type, $dayDateTime, false),
+ 'absolute_url' => $indexUrl . 'daily?' . $type . '=' . $day,
'links' => [],
];