n8n/packages
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
..
@n8n 🚀 Release 1.23.0 (#8205) 2024-01-03 13:41:28 +01:00
@n8n_io/eslint-config ci: Disable import/no-extraneous-dependencies in frontend tests (no-changelog) (#8182) 2023-12-29 10:45:55 +01:00
cli perf(core): Improve caching service (#8213) 2024-01-05 11:52:44 +01:00
core feat(HTTP Request Node): Interval Between Requests option for pagination (#8224) 2024-01-04 17:11:16 +02:00
design-system feat(editor): Add fullscreen view to code editor (#8084) 2024-01-04 17:23:24 +01:00
editor-ui fix: Adjust 'use template' feature telemetry (no-changelog) (#8232) 2024-01-05 11:52:10 +02:00
node-dev 🚀 Release 1.23.0 (#8205) 2024-01-03 13:41:28 +01:00
nodes-base fix(Nextcloud Node): Throw an actual error if server responded with Fatal error (#8234) 2024-01-05 12:13:29 +02:00
workflow feat(HTTP Request Node): Interval Between Requests option for pagination (#8224) 2024-01-04 17:11:16 +02:00