From 277a1704ec467d89dca047e7e3cb1d08a0fb0e6e Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Mon, 29 Aug 2022 19:54:45 +0300 Subject: [PATCH] Update astro.com.my.config.js --- sites/astro.com.my/astro.com.my.config.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sites/astro.com.my/astro.com.my.config.js b/sites/astro.com.my/astro.com.my.config.js index 5b448ae5..e439b072 100644 --- a/sites/astro.com.my/astro.com.my.config.js +++ b/sites/astro.com.my/astro.com.my.config.js @@ -4,10 +4,15 @@ const utc = require('dayjs/plugin/utc') dayjs.extend(utc) module.exports = { site: 'astro.com.my', + request: { + cache: { + ttl: 6 * 60 * 60 * 1000 // 6h + } + }, url: function ({ channel }) { return `https://contenthub-api.eco.astro.com.my/channel/${channel.site_id}.json` }, - parser: function ({ content, date }) { + parser: function ({ content, date, cached }) { const programs = [] const items = parseItems(content, date) items.forEach(item => {