n8n/packages/cli/src/controllers
Iván Ovejero f53c482939
perf(core): Improve caching service (#8213)
Story: https://linear.app/n8n/issue/PAY-1188

- Implement Redis hashes on the caching service, based on Micha's work
in #7747, adapted from `node-cache-manager-ioredis-yet`. Optimize
workflow ownership lookups and manual webhook lookups with Redis hashes.
- Simplify the caching service by removing all currently unused methods
and options: `enable`, `disable`, `getCache`, `keys`, `keyValues`,
`refreshFunctionEach`, `refreshFunctionMany`, `refreshTtl`, etc.
- Remove the flag `N8N_CACHE_ENABLED`. Currently some features on
`master` are broken with caching disabled, and test webhooks now rely
entirely on caching, for multi-main setup support. We originally
introduced this flag to protect against excessive memory usage, but
total cache usage is low enough that we decided to drop this setting.
Apparently this flag was also never documented.
- Overall caching service refactor: use generics, reduce branching, add
discriminants for cache kinds for better type safety, type caching
events, improve readability, remove outdated docs, etc. Also refactor
and expand caching service tests.

Follow-up to: https://github.com/n8n-io/n8n/pull/8176

---------

Co-authored-by: Michael Auerswald <michael.auerswald@gmail.com>
2024-01-05 11:52:44 +01:00
..
oauth refactor(core): Use Dependency Injection for all Controller classes (no-changelog) (#8146) 2023-12-27 11:50:43 +01:00
activeWorkflows.controller.ts refactor(core): Use Dependency Injection for all Controller classes (no-changelog) (#8146) 2023-12-27 11:50:43 +01:00
auth.controller.ts refactor(core): Continue moving typeorm operators to repositories (no-changelog) (#8186) 2024-01-02 17:53:24 +01:00
binaryData.controller.ts refactor(core): Use Dependency Injection for all Controller classes (no-changelog) (#8146) 2023-12-27 11:50:43 +01:00
communityPackages.controller.ts refactor(core): Use Dependency Injection for all Controller classes (no-changelog) (#8146) 2023-12-27 11:50:43 +01:00
debug.controller.ts refactor(core): Move typeorm operators from various sources into repositories (no-changelog) (#8174) 2023-12-28 13:14:10 +01:00
dynamicNodeParameters.controller.ts refactor(core): Use Dependency Injection for all Controller classes (no-changelog) (#8146) 2023-12-27 11:50:43 +01:00
e2e.controller.ts perf(core): Improve caching service (#8213) 2024-01-05 11:52:44 +01:00
invitation.controller.ts refactor(core): Continue moving typeorm operators to repositories (no-changelog) (#8186) 2024-01-02 17:53:24 +01:00
ldap.controller.ts refactor(core): Use Dependency Injection for all Controller classes (no-changelog) (#8146) 2023-12-27 11:50:43 +01:00
me.controller.ts refactor(core): Continue moving typeorm operators to repositories (no-changelog) (#8186) 2024-01-02 17:53:24 +01:00
mfa.controller.ts refactor(core): Use Dependency Injection for all Controller classes (no-changelog) (#8146) 2023-12-27 11:50:43 +01:00
nodeTypes.controller.ts refactor(core): Use Dependency Injection for all Controller classes (no-changelog) (#8146) 2023-12-27 11:50:43 +01:00
orchestration.controller.ts refactor(core): Use Dependency Injection for all Controller classes (no-changelog) (#8146) 2023-12-27 11:50:43 +01:00
owner.controller.ts refactor(core): Continue moving typeorm operators to repositories (no-changelog) (#8186) 2024-01-02 17:53:24 +01:00
passwordReset.controller.ts refactor(core): Continue moving typeorm operators to repositories (no-changelog) (#8186) 2024-01-02 17:53:24 +01:00
role.controller.ts refactor(core): Use Dependency Injection for all Controller classes (no-changelog) (#8146) 2023-12-27 11:50:43 +01:00
tags.controller.ts refactor(core): Use Dependency Injection for all Controller classes (no-changelog) (#8146) 2023-12-27 11:50:43 +01:00
translation.controller.ts refactor(core): Use Dependency Injection for all Controller classes (no-changelog) (#8146) 2023-12-27 11:50:43 +01:00
users.controller.ts fix(core): Better input validation for the changeRole endpoint (#8189) 2024-01-03 09:33:35 +01:00
workflowStatistics.controller.ts refactor(core): Move typeorm operators from various sources into repositories (no-changelog) (#8174) 2023-12-28 13:14:10 +01:00