Cache
Uma implementação de cache para tornar o sistema mais fluido e nem sempre depender de operações SQL.
Disponíveis:
Redis
Fake
Métodos:
Save: Armazena em cachê um valor passado em uma chave.
const data = { message: 'data' };
await this.cacheProvider.save('key:id=123', data);
Recovery: Recupera os dados em cachê a partir de uma chave.
const data = await this.cacheProvider.recovery('key:id=123');
Invalidate: Deleta um conjunto chave valor específico.
await this.cacheProvider.invalidate('key:id=123');
InvalidatePrefix: Deleta todos os conjuntos chave valor iniciados pela chave passada.
await this.cacheProvider.invalidatePrefix('key');
Last updated
Was this helpful?