Esempio n. 1
0
 public function index()
 {
     $pagedata['enable'] = get_class(cacheobject::instance()) == 'base_cache_nocache' ? false : true;
     if (cacheobject::status($msg)) {
         $pagedata['status'] = $msg;
     }
     $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;
                 }
                 $pagedata['static_cache'][] = $method;
             }
         }
     }
     return $this->page('desktop/cachemgr/index.html', $pagedata);
 }