Commit f2b0a774 authored by Diego Molteni's avatar Diego Molteni
Browse files

testing db on cache

parent f32ad52d
Pipeline #33696 failed with stages
in 2 minutes and 53 seconds
This diff is collapsed.
......@@ -56,6 +56,11 @@ export class Cache<T=string> {
})
}
public async del(key: string): Promise<void> {
return await this._del(key);
}
public async get(key: string): Promise<T> {
return await this._get(key);
}
......@@ -68,6 +73,14 @@ export class Cache<T=string> {
return this._keyTag ? (this._keyTag + ':' + key) : key;
}
private async _del(key: string): Promise<void> {
return new Promise((resolve, reject) => {
this._redisClient.del(
this.buildKey(key), (err) => {
err ? reject(err) : resolve(); });
});
}
private async _get(key: string): Promise<T> {
return new Promise((resolve, reject) => {
this._redisClient.get(
......
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