mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-08 22:19:40 +08:00
feat: use contentExpire
This commit is contained in:
@@ -2,7 +2,6 @@ const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
|
||||
const BASE_URL = 'https://minecraft.curseforge.com/';
|
||||
const CACHE_TIME = 24 * 60 * 60;
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const { project } = ctx.params;
|
||||
@@ -37,7 +36,7 @@ module.exports = async (ctx) => {
|
||||
document.pubDate = new Date(Number($item('.standard-datetime').attr('data-epoch')) * 1000).toUTCString();
|
||||
document.guid = $item('.md5').text();
|
||||
|
||||
await ctx.cache.set(document.link, JSON.stringify(document), CACHE_TIME);
|
||||
await ctx.cache.set(document.link, JSON.stringify(document));
|
||||
|
||||
return document;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user