test redis
This commit is contained in:
parent
f4ec11f55e
commit
33b850875e
|
|
@ -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)
|
||||||
// }
|
}
|
||||||
// })
|
})
|
||||||
Loading…
Reference in New Issue