Commit 8ea17e98 authored by nanahira's avatar nanahira

use exists for has

parent a16edf4d
......@@ -16,6 +16,10 @@ export class RedisDriver extends BaseDriver {
this.redlock = new Redlock([this.redis], options.lock);
}
override async has(baseKey: string, key: string) {
return (await this.redis.exists(this.usingKey(baseKey, key))) !== 0;
}
override async get(baseKey: string, key: string): Promise<Buffer> {
return this.redis.getBuffer(this.usingKey(baseKey, key));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment