import { InjectRedis } from '@liaoliaots/nestjs-redis'; import { Injectable } from '@nestjs/common'; import { Redis } from 'ioredis'; import { IConfigurationRepository } from '../../domain/interfaces/configuration.repository'; @Injectable() export class RedisConfigurationRepository extends IConfigurationRepository { constructor(@InjectRedis() private readonly _redis: Redis) { super(); } async get(key: string): Promise { return await this._redis.get(key); } async set(key: string, value: string) { await this._redis.set(key, value); } async del(key: string) { await this._redis.del(key); } }