FEAT: create user from identity provider

This commit is contained in:
marcos-silva-rodrigues
2025-06-27 13:21:59 -03:00
parent 57e6e49c7c
commit f726a9883f
10 changed files with 436 additions and 110 deletions
+23
View File
@@ -0,0 +1,23 @@
import { CACHE_MANAGER, Inject, Injectable } from '@nestjs/common';
import { Cache } from 'cache-manager';
@Injectable()
export class CacheService<T> {
constructor(
@Inject(CACHE_MANAGER)
private readonly cacheManager: Cache,
) {}
async get(key: string): Promise<T | null> {
return await this.cacheManager.get<T>(key);
}
async set(key: string, value: T): Promise<void> {
await this.cacheManager.set(key, value);
}
async delete(key: string) {
await this.cacheManager.del(key);
}
}