mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-05 12:21:31 +08:00
feat: use contentExpire
This commit is contained in:
@@ -38,7 +38,7 @@ module.exports = async (ctx) => {
|
||||
description: description,
|
||||
pubDate: new Date(date).toUTCString(),
|
||||
};
|
||||
ctx.cache.set(itemUrl, JSON.stringify(single), 24 * 60 * 60);
|
||||
ctx.cache.set(itemUrl, JSON.stringify(single));
|
||||
return Promise.resolve(single);
|
||||
})
|
||||
);
|
||||
|
||||
@@ -51,7 +51,7 @@ module.exports = async (ctx) => {
|
||||
});
|
||||
|
||||
item.description = $('#articleContent').html();
|
||||
ctx.cache.set(key, item.description, 24 * 60 * 60);
|
||||
ctx.cache.set(key, item.description);
|
||||
}
|
||||
|
||||
return Promise.resolve(item);
|
||||
|
||||
@@ -40,7 +40,7 @@ module.exports = async (ctx) => {
|
||||
author: author,
|
||||
pubDate: new Date(date).toUTCString(),
|
||||
};
|
||||
ctx.cache.set(itemUrl, JSON.stringify(single), 24 * 60 * 60);
|
||||
ctx.cache.set(itemUrl, JSON.stringify(single));
|
||||
return Promise.resolve(single);
|
||||
})
|
||||
);
|
||||
|
||||
@@ -44,7 +44,7 @@ module.exports = async (ctx) => {
|
||||
});
|
||||
|
||||
item.description = $('.art-cont').html();
|
||||
ctx.cache.set(key, item.description, 24 * 60 * 60);
|
||||
ctx.cache.set(key, item.description);
|
||||
}
|
||||
|
||||
return Promise.resolve(item);
|
||||
|
||||
@@ -53,7 +53,7 @@ module.exports = async (ctx) => {
|
||||
author: author,
|
||||
pubDate: new Date(date).toUTCString(),
|
||||
};
|
||||
ctx.cache.set(itemUrl, JSON.stringify(single), 24 * 60 * 60);
|
||||
ctx.cache.set(itemUrl, JSON.stringify(single));
|
||||
return Promise.resolve(single);
|
||||
})
|
||||
);
|
||||
|
||||
@@ -44,7 +44,7 @@ module.exports = async (ctx) => {
|
||||
});
|
||||
|
||||
item.description = $(`#${id}`).html();
|
||||
ctx.cache.set(key, item.description, 24 * 60 * 60);
|
||||
ctx.cache.set(key, item.description);
|
||||
}
|
||||
|
||||
return Promise.resolve(item);
|
||||
|
||||
Reference in New Issue
Block a user