test redis

This commit is contained in:
joseph le 2023-10-30 07:49:53 +07:00
parent f4ec11f55e
commit 33b850875e
1 changed files with 14 additions and 14 deletions

View File

@ -300,18 +300,18 @@ Route.post("/api/sendMailInforDevice", async () => {
"writeLog" "writeLog"
); );
// Route.post("/api/test", async () => { Route.post("/api/test", async () => {
// try { try {
// const logs = await Cache.get('logs') const logs = await Cache.get('logs')
// if(logs){ if(logs){
// return {type: "cache", data: logs} return {type: "cache", data: logs}
// }else{ }else{
// let data = await LogReport.all(); let data = await LogReport.all();
// Cache.set('logs', data, 120) Cache.set('logs', data, 120)
// return {type: "no cache", data: data} return {type: "no cache", data: data}
// } }
// } catch (error) { } catch (error) {
// console.log(error) console.log(error)
// } }
// }) })