mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-18 11:22:21 -06:00
Added redis cache for on whatsapp & TTL on .env
This commit is contained in:
@@ -35,11 +35,11 @@ export class CacheService {
|
||||
}
|
||||
}
|
||||
|
||||
async set(key: string, value: any) {
|
||||
async set(key: string, value: any, ttl?: number) {
|
||||
if (!this.cache) {
|
||||
return;
|
||||
}
|
||||
this.cache.set(key, value);
|
||||
this.cache.set(key, value, ttl);
|
||||
}
|
||||
|
||||
public async hSet(key: string, field: string, value: any) {
|
||||
|
||||
Reference in New Issue
Block a user