Return null in case of expired cache
This commit is contained in:
1 parent
17889cf41c
commit
fd34dd8839
1 file changed
+1
-1
+1
-1
@@ -62,7 +62,7 @@ export async function get(key): Promise<any> {
|
||||
} else {
|
||||
const res = await mongoCollection.findOne({ _id: { $in: [key] } });
|
||||
if (res && res["expire"] > expire) return res["value"];
|
||||
return res;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user