Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/FastCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,22 @@ export class FastCache {
await this.client.del(keys);
}

public async incr(key: string): Promise<number> {
return this.client.incr(key);
}

public async incrBy(key: string, increment: number): Promise<number> {
return this.client.incrby(key, increment);
}

public async decr(key: string): Promise<number> {
return this.client.decr(key);
}

public async decrBy(key: string, decrement: number): Promise<number> {
return this.client.decrby(key, decrement);
}

public async flush(pattern: string): Promise<void> {
if (pattern === '*******') {
await this.client.flushdb('ASYNC');
Expand Down