示例#1
0
 public function status()
 {
     $this->pagedata['status'] = 'current';
     $this->index();
     if (cachemgr::status($msg)) {
         $this->pagedata['status'] = $msg;
         // $this->display('cachemgr/status.html');
     } else {
         //echo '<p class="notice">'.(($msg) ? $msg : app::get('desktop')->_('无法查看状态')).'</p>';
     }
 }
示例#2
0
 public function status()
 {
     $this->pagedata['status'] = 'current';
     $this->index();
     if (cachemgr::status($msg)) {
         $this->pagedata['status'] = $msg;
         $this->display('cachemgr/status.html');
     } else {
         echo '<p class="notice">' . ($msg ? $msg : '无法查看状态') . '</p>';
     }
 }
示例#3
0
 public function getCacheInfo()
 {
     if (!defined("CACHE_STORAGE")) {
         return false;
     }
     $aTmp = explode("_", CACHE_STORAGE);
     $msg = false;
     cachemgr::status($msg);
     $aResult = array("name" => $aTmp[count($aTmp) - 1], "status" => $msg);
     return $aResult;
 }
示例#4
0
 public function index()
 {
     $this->pagedata['enable'] = get_class(cachemgr::instance()) == 'base_cache_nocache' ? 'false' : 'true';
     if (cachemgr::status($status)) {
         // foreach ($status as $key => $value) {
         //     $status_obj[] = array(
         //         'label'=>$key,
         //         'data'=>$value
         //     );
         // }
         $this->pagedata['status'] = $status;
     }
     $this->pagedata['cache_name'] = cachemgr::instance()->name;
     $this->pagedata['static_cache'] = array();
     $this->pagedata['syscache'] = array('setting_cache' => syscache::instance('setting')->get_status(), 'service_cache' => syscache::instance('service')->get_status());
     $this->pagedata['kvstore'] = array('name' => vmc::singleton('base_kvstore')->get_controller()->name, 'kvprefix' => base_kvstore::kvprefix());
     foreach (vmc::servicelist('site.router.cache') as $value) {
         if (!method_exists($value, 'get_cache_methods')) {
             continue;
         }
         $methods = $value->get_cache_methods();
         foreach ((array) $methods as $method) {
             if (isset($method['app']) && isset($method['ctl']) && isset($method['act'])) {
                 $expires = app::get('site')->getConf($method['app'] . '_' . $method['ctl'] . '_' . $method['act'] . '.cache_expires');
                 if ($expires !== null) {
                     $method['expires'] = $expires;
                 }
                 $this->pagedata['static_cache'][] = $method;
             }
         }
     }
     foreach (vmc::servicelist('mobile.router.cache') as $value) {
         if (!method_exists($value, 'get_cache_methods')) {
             continue;
         }
         $methods = $value->get_cache_methods();
         foreach ((array) $methods as $method) {
             if (isset($method['app']) && isset($method['ctl']) && isset($method['act'])) {
                 $expires = app::get('mobile')->getConf($method['app'] . '_' . $method['ctl'] . '_' . $method['act'] . '.cache_expires');
                 if ($expires !== null) {
                     $method['expires'] = $expires;
                 }
                 $this->pagedata['mstatic_cache'][] = $method;
             }
         }
     }
     $this->page('cachestage/index.html');
 }
示例#5
0
 public function index()
 {
     $this->pagedata['enable'] = get_class(cachemgr::instance()) == 'base_cache_nocache' ? 'false' : 'true';
     if (cachemgr::status($msg)) {
         $this->pagedata['status'] = $msg;
     }
     $this->pagedata['static_cache'] = array();
     foreach (kernel::servicelist('site.router.cache') as $value) {
         if (!method_exists($value, 'get_cache_methods')) {
             continue;
         }
         $methods = $value->get_cache_methods();
         foreach ((array) $methods as $method) {
             if (isset($method['app']) && isset($method['ctl']) && isset($method['act'])) {
                 if ($expires = app::get('site')->getConf($method['app'] . '_' . $method['ctl'] . '_' . $method['act'] . '.cache_expires')) {
                     $method['expires'] = $expires;
                 }
                 $this->pagedata['static_cache'][] = $method;
             }
         }
     }
     $this->page('cachemgr/index.html');
 }