mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
fix(core): Handle Redis cache prefix on cluster mode (#17957)
This commit is contained in:
@@ -40,9 +40,12 @@ export class CacheService extends TypedEmitter<CacheEvents> {
|
||||
const redisClientService = Container.get(RedisClientService);
|
||||
|
||||
const prefixBase = this.globalConfig.redis.prefix;
|
||||
const prefix = redisClientService.toValidPrefix(
|
||||
`${prefixBase}:${this.globalConfig.cache.redis.prefix}:`,
|
||||
);
|
||||
const cachePrefix = this.globalConfig.cache.redis.prefix;
|
||||
|
||||
// For cluster mode, we need to ensure proper hash tagging: {n8n:cache}:
|
||||
// instead of {n8n:cache:} to keep the colon outside the hash tag
|
||||
const hashTagPart = `${prefixBase}:${cachePrefix}`;
|
||||
const prefix = redisClientService.toValidPrefix(hashTagPart) + ':';
|
||||
|
||||
const redisClient = redisClientService.createClient({
|
||||
type: 'cache(n8n)',
|
||||
|
||||
Reference in New Issue
Block a user