mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
feat(core): Add cache service (#6729)
* add cache service * PR adjustments * switch to maxSize for memory cache
This commit is contained in:
committed by
GitHub
parent
e1e6d4a749
commit
c0d2bac94d
@@ -1101,4 +1101,41 @@ export const schema = {
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
cache: {
|
||||
enabled: {
|
||||
doc: 'Whether caching is enabled',
|
||||
format: Boolean,
|
||||
default: true,
|
||||
env: 'N8N_CACHE_ENABLED',
|
||||
},
|
||||
backend: {
|
||||
doc: 'Backend to use for caching',
|
||||
format: ['memory', 'redis', 'auto'] as const,
|
||||
default: 'auto',
|
||||
env: 'N8N_CACHE_BACKEND',
|
||||
},
|
||||
memory: {
|
||||
maxSize: {
|
||||
doc: 'Maximum size of memory cache in bytes',
|
||||
format: Number,
|
||||
default: 3 * 1024 * 1024, // 3 MB
|
||||
env: 'N8N_CACHE_MEMORY_MAX_SIZE',
|
||||
},
|
||||
ttl: {
|
||||
doc: 'Time to live for cached items in memory (in ms)',
|
||||
format: Number,
|
||||
default: 3600 * 1000, // 1 hour
|
||||
env: 'N8N_CACHE_MEMORY_TTL',
|
||||
},
|
||||
},
|
||||
redis: {
|
||||
ttl: {
|
||||
doc: 'Time to live for cached items in redis (in ms), 0 for no TTL',
|
||||
format: Number,
|
||||
default: 0,
|
||||
env: 'N8N_CACHE_REDIS_TTL',
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user