Added cache reload button to admin panel so restarts are needed less often.

This commit is contained in:
2026-03-06 06:12:23 +01:00
parent 9a59448933
commit 6c1f1c2a1c
12 changed files with 78 additions and 10 deletions

View File

@@ -1,5 +1,9 @@
import redis from './redis.js';
import { cacheTagIds } from './tags.js';
import { cacheEntityIds } from './entities.js';
import { cacheCampaigns } from './campaigns.js';
export async function getIdsBySlug(slugs, domain, toMap) {
if (!slugs) {
return [];
@@ -25,3 +29,11 @@ export async function getIdsBySlug(slugs, domain, toMap) {
return ids.filter(Boolean);
}
export async function initCaches() {
await Promise.all([
cacheTagIds(),
cacheEntityIds(),
cacheCampaigns(),
]);
}