n8n/packages/cli/test/integration
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
..
commands perf(core): Improve caching service (#8213) 2024-01-05 11:52:44 +01:00
database/repositories refactor(core): Delete unused code, and fix typings in tests (no-changelog) (#8142) 2023-12-22 15:41:29 +01:00
environments refactor(core): Use Dependency Injection for all Controller classes (no-changelog) (#8146) 2023-12-27 11:50:43 +01:00
ExternalSecrets refactor(core): Add central license mock for integration tests (no-changelog) (#7871) 2023-11-30 09:23:09 +01:00
ldap ci(core): Reduce memory usage in tests (part-2) (no-changelog) (#7671) 2023-11-10 15:04:26 +01:00
mfa ci(core): Reduce memory usage in tests (part-2) (no-changelog) (#7671) 2023-11-10 15:04:26 +01:00
middlewares
publicApi refactor(core): Move error execution creation to execution service (no-changelog) (#8006) 2023-12-21 14:15:46 +01:00
saml ci(core): Reduce memory usage in tests (part-1) (no-changelog) (#7654) 2023-11-08 16:29:39 +01:00
security-audit perf(core): Lazyload security audit reporters (#7696) 2023-11-13 11:50:43 +01:00
shared refactor(core): Use Dependency Injection for all Controller classes (no-changelog) (#8146) 2023-12-27 11:50:43 +01:00
ActiveWorkflowRunner.test.ts refactor(core): Move active workflows endpoints to a decorated controller class (no-changelog) (#8101) 2023-12-22 11:28:42 +01:00
auth.api.test.ts fix(core): Make sure mfa secret and recovery codes are not returned on login (#7936) 2023-12-06 10:00:13 +01:00
auth.mw.test.ts refactor(core): Move error execution creation to execution service (no-changelog) (#8006) 2023-12-21 14:15:46 +01:00
binaryData.api.test.ts fix(core): Account for non-ASCII chars in filename on binary data download (#7742) 2023-11-17 10:07:44 +01:00
community-packages.api.test.ts ci(core): Reduce memory usage in tests (part-2) (no-changelog) (#7671) 2023-11-10 15:04:26 +01:00
credentials.controller.test.ts refactor(core): Delete unused code, and fix typings in tests (no-changelog) (#8142) 2023-12-22 15:41:29 +01:00
credentials.ee.test.ts fix: Restrict updating/deleting of shared but not owned credentials (#7950) 2023-12-07 10:35:40 +00:00
credentials.test.ts fix: Restrict updating/deleting of shared but not owned credentials (#7950) 2023-12-07 10:35:40 +00:00
debug.controller.test.ts refactor(core): Move typeorm operators from various sources into repositories (no-changelog) (#8174) 2023-12-28 13:14:10 +01:00
eventbus.ee.test.ts ci: Stop disabling linting rules that are explicitly set to warn (no-changelog) (#7669) 2023-11-09 14:05:39 +01:00
eventbus.test.ts ci(core): Reduce memory usage in tests (part-1) (no-changelog) (#7654) 2023-11-08 16:29:39 +01:00
executions.controller.test.ts ci(core): Reduce memory usage in tests (part-2) (no-changelog) (#7671) 2023-11-10 15:04:26 +01:00
import.service.test.ts refactor(core): Introduce import service (no-changelog) (#8001) 2023-12-13 10:00:21 +01:00
invitations.api.test.ts refactor(core): Introduce password utility (no-changelog) (#7979) 2023-12-11 18:23:42 +01:00
license.api.test.ts refactor(core): Move license endpoints to a decorated controller class (no-changelog) (#8074) 2023-12-19 12:13:19 +01:00
me.api.test.ts ci(core): Reduce memory usage in tests (part-2) (no-changelog) (#7671) 2023-11-10 15:04:26 +01:00
metrics.test.ts
owner.api.test.ts fix: Return scopes on owner setup endpoint (no-changelog) (#7860) 2023-11-29 11:33:32 +00:00
passwordReset.api.test.ts refactor(core): Introduce password utility (no-changelog) (#7979) 2023-12-11 18:23:42 +01:00
pruning.service.test.ts ci(core): Reduce memory usage in tests (part-2) (no-changelog) (#7671) 2023-11-10 15:04:26 +01:00
role.api.test.ts refactor(core): Add central license mock for integration tests (no-changelog) (#7871) 2023-11-30 09:23:09 +01:00
role.repository.test.ts refactor: Add telemetry for RBAC (no-changelog) (#8056) 2023-12-19 17:02:52 +01:00
tags.api.test.ts ci(core): Reduce memory usage in tests (part-2) (no-changelog) (#7671) 2023-11-10 15:04:26 +01:00
users.api.test.ts fix(core): Better input validation for the changeRole endpoint (#8189) 2024-01-03 09:33:35 +01:00
variables.test.ts refactor(core): Add central license mock for integration tests (no-changelog) (#7871) 2023-11-30 09:23:09 +01:00
webhooks.api.test.ts ci(core): Reduce memory usage in tests (part-2) (no-changelog) (#7671) 2023-11-10 15:04:26 +01:00
workflow.service.test.ts fix(core): Minor improvements to multi-main setup (no-changelog) (#8012) 2023-12-27 16:55:01 +01:00
workflowHistory.api.test.ts refactor(core): Add central license mock for integration tests (no-changelog) (#7871) 2023-11-30 09:23:09 +01:00
workflowHistoryManager.test.ts ci(core): Reduce memory usage in tests (part-2) (no-changelog) (#7671) 2023-11-10 15:04:26 +01:00
workflows.controller.ee.test.ts refactor(core): Inject dependencies into workflow services (no-changelog) (#8066) 2023-12-18 16:10:30 +01:00
workflows.controller.test.ts refactor(core): Unify workflow controllers (no-changelog) (#8175) 2023-12-29 14:23:58 +01:00