mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
perf(core): Populate cache only with static webhooks (#16048)
This commit is contained in:
@@ -32,11 +32,11 @@ export class WebhookService {
|
||||
) {}
|
||||
|
||||
async populateCache() {
|
||||
const allWebhooks = await this.webhookRepository.find();
|
||||
const staticWebhooks = await this.webhookRepository.getStaticWebhooks();
|
||||
|
||||
if (!allWebhooks) return;
|
||||
if (staticWebhooks.length === 0) return;
|
||||
|
||||
void this.cacheService.setMany(allWebhooks.map((w) => [w.cacheKey, w]));
|
||||
void this.cacheService.setMany(staticWebhooks.map((w) => [w.cacheKey, w]));
|
||||
}
|
||||
|
||||
async findAll() {
|
||||
|
||||
Reference in New Issue
Block a user