Add redis.increment

This commit is contained in:
Adria Navarro 2024-03-05 22:43:28 +01:00
parent a093cfca99
commit 339ca403bf
1 changed files with 5 additions and 0 deletions

View File

@ -331,6 +331,11 @@ class RedisWrapper {
let items = await this.scan()
await Promise.all(items.map((obj: any) => this.delete(obj.key)))
}
async increment(key: string) {
const result = await this.getClient().incr(addDbPrefix(this._db, key))
return result
}
}
export default RedisWrapper