fix: value of rss TTL tag (#2297)

* fix value of rss TTL tag

* fix test algorithm for rss ttl tag
This commit is contained in:
tuzi3040
2019-06-04 11:02:56 +08:00
committed by DIYgod
parent 21cd347aa4
commit a04a88d2cd
2 changed files with 4 additions and 2 deletions

View File

@@ -51,10 +51,12 @@ module.exports = async (ctx, next) => {
});
}
const routeTtl = (config.cache.routeExpire / 60) | 0;
const data = {
lastBuildDate: new Date().toUTCString(),
updated: new Date().toISOString(),
ttl: config.cache.routeExpire,
ttl: routeTtl,
...ctx.state.data,
};
if (template) {