mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-10 23:34:38 +08:00
test: cache object
This commit is contained in:
@@ -15,10 +15,16 @@ module.exports = async (ctx) => {
|
||||
author: `DIYgod0`,
|
||||
});
|
||||
} else if (ctx.params.id === 'cache') {
|
||||
const description = await ctx.cache.tryGet('test', () => `Cache${++cacheIndex}`, config.cache.routeExpire * 2);
|
||||
const description = await ctx.cache.tryGet(
|
||||
'test',
|
||||
() => ({
|
||||
text: `Cache${++cacheIndex}`,
|
||||
}),
|
||||
config.cache.routeExpire * 2
|
||||
);
|
||||
item.push({
|
||||
title: 'Cache Title',
|
||||
description: description,
|
||||
description: description.text,
|
||||
pubDate: new Date(`2018-3-1`).toUTCString(),
|
||||
link: `https://github.com/DIYgod/RSSHub/issues/0`,
|
||||
author: `DIYgod0`,
|
||||
|
||||
Reference in New Issue
Block a user