var system=require("../../system")
var settings=require("../../../config/settings");
const CtlBase = require("../ctl.base");
const uuidv4 = require('uuid/v4');
class CacheCtl extends CtlBase{
   constructor(){
     super(CtlBase.getServiceName(CacheCtl));
     //this.appS=system.getObject("service.appSve");
   }
   async initNewInstance(queryobj,qobj){
     return system.getResult2({},null);
   }
   async delCache(queryobj,qobj){
     await this.service.delCache(qobj);
     return system.getResult2({},null);
   }
   async findOnlines(queryobj,qobj,req){
     //var ms=await this.cacheManager["VisitCountCache"].findOnlines(req.session.app.appid);
     var ms=await this.cacheManager["VisitCountCache"].findOnlines();
     console.log("xxxxxxxxxxxxxxxxxxxxxxxxxxxx");
     console.log(ms);
     return system.getResult2(ms,null);
   }
   async clearAllCache(queryobj,qobj){
     console.log("clearAllCache===========================");
     await this.service.clearAllCache(qobj);
     return system.getResult2({},null);
   }
}
module.exports=CacheCtl;
