removed configs from all libs and will inject them within the services themselves
This commit is contained in:
parent
fd28162811
commit
6cc5b339bc
32 changed files with 366 additions and 349 deletions
3
libs/cache/src/redis-cache.ts
vendored
3
libs/cache/src/redis-cache.ts
vendored
|
|
@ -25,7 +25,7 @@ export class RedisCache implements CacheProvider {
|
|||
uptime: 0,
|
||||
};
|
||||
|
||||
constructor(options: CacheOptions = {}) {
|
||||
constructor(options: CacheOptions) {
|
||||
this.defaultTTL = options.ttl ?? 3600; // 1 hour default
|
||||
this.keyPrefix = options.keyPrefix ?? 'cache:';
|
||||
this.enableMetrics = options.enableMetrics ?? true;
|
||||
|
|
@ -46,6 +46,7 @@ export class RedisCache implements CacheProvider {
|
|||
this.redis = this.connectionManager.getConnection({
|
||||
name: `${baseName}-SERVICE`,
|
||||
singleton: options.shared ?? true, // Default to shared connection for cache
|
||||
redisConfig: options.redisConfig,
|
||||
});
|
||||
|
||||
// Only setup event handlers for non-shared connections to avoid memory leaks
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue