mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 12:21:00 -05:00
Remove cache hit & miss logs
This commit is contained in:
parent
0d405f7167
commit
9719fce92f
@ -26,13 +26,8 @@ export default class CacheServer {
|
|||||||
}
|
}
|
||||||
static async get(key:any) {
|
static async get(key:any) {
|
||||||
const cachedResult = await RedisClient.get(key);
|
const cachedResult = await RedisClient.get(key);
|
||||||
if (cachedResult) {
|
if (cachedResult) return JSON.parse(cachedResult);
|
||||||
Logger.forwardToConsole('log', Prefix, `Cache hit for ${key}`);
|
else return null
|
||||||
return JSON.parse(cachedResult);
|
|
||||||
} else {
|
|
||||||
Logger.forwardToConsole('log', Prefix, `Cache miss for ${key}`);
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
static async set(key:any, value:any) {
|
static async set(key:any, value:any) {
|
||||||
Logger.forwardToConsole('log', Prefix, `Building cache for ${key}`);
|
Logger.forwardToConsole('log', Prefix, `Building cache for ${key}`);
|
||||||
|
Loading…
Reference in New Issue
Block a user