mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
Cache trends API results at a different interval than trends calculations
This commit is contained in:
parent
844ebe0323
commit
a3b7acd1c1
1 changed files with 2 additions and 2 deletions
|
|
@ -11,7 +11,7 @@ import { renderStatus } from '@/views/mastodon/statuses.ts';
|
||||||
|
|
||||||
let trendingHashtagsCache = getTrendingHashtags();
|
let trendingHashtagsCache = getTrendingHashtags();
|
||||||
|
|
||||||
Deno.cron('update trending hashtags cache', { minute: { every: 15 } }, async () => {
|
Deno.cron('update trending hashtags cache', '35 * * * *', async () => {
|
||||||
const trends = await getTrendingHashtags();
|
const trends = await getTrendingHashtags();
|
||||||
trendingHashtagsCache = Promise.resolve(trends);
|
trendingHashtagsCache = Promise.resolve(trends);
|
||||||
});
|
});
|
||||||
|
|
@ -50,7 +50,7 @@ async function getTrendingHashtags() {
|
||||||
|
|
||||||
let trendingLinksCache = getTrendingLinks();
|
let trendingLinksCache = getTrendingLinks();
|
||||||
|
|
||||||
Deno.cron('update trending links cache', { minute: { every: 15 } }, async () => {
|
Deno.cron('update trending links cache', '50 * * * *', async () => {
|
||||||
const trends = await getTrendingLinks();
|
const trends = await getTrendingLinks();
|
||||||
trendingLinksCache = Promise.resolve(trends);
|
trendingLinksCache = Promise.resolve(trends);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue