maybe i dont understand the concept but when i save in the cache and then log to get the data i see it but when i go terminal and do GET ALL or GET 'key' its say nil
this is my microservice
main.ts
async function bootstrap() {
const app = await NestFactory.createMicroservice<MicroserviceOptions>(
ExpenseSummeryModule,
{ transport: Transport.REDIS, options: { host: 'localhost', port: 6379 } },
);
await app.listen();
}
bootstrap();
this is my expense-summery.module.ts
@Module({
imports: [
ConfigModule.forRoot({
isGlobal: true,
validationSchema: configValidationSchema,
envFilePath: './apps/expense-summery/.env',
}),
CacheModule.register<RedisClientOptions>({
store: redisStore,
// Store-specific configuration:
host: 'localhost',
port: 6379,
}),
// DatabaseModule,
],
controllers: [ExpenseSummeryController],
providers: [ExpenseSummeryService],
})
export class ExpenseSummeryModule {}
and this is my controller
@Injectable()
export class ExpenseSummeryService {
private readonly expenses: any[] = [];
constructor(@Inject(CACHE_MANAGER) private cacheManager: Cache) {}
getHello(): string {
return 'Hello World!';
}
async handleExpenseSummery(data: ExpenseSummeryEvent) {
this.expenses.push(data.result);
await this.cacheManager.set('key', 'value');
console.log('handleExpenseSummery - EXPENSE', data);
}
async getExpenses() {
const value = await this.cacheManager.get('key');
console.log(value);
return this.expenses;
}
}
the log is working and i see the value but on the redis-cli i cant see anything
thanks for help with that !

have you seen the dragonfly project?
Thanks for letting me know.