public function index() { $this->pagedata['enable'] = get_class(cachemgr::instance()) == 'base_cache_nocache' ? 'false' : 'true'; if (cachemgr::status($msg)) { $this->pagedata['status'] = $msg; } $this->page('cachemgr/index.html'); }
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'); }
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'); }