예제 #1
0
 protected function check_vary_list()
 {
     if (!isset($this->_vary_list)) {
         $this->_vary_list = cachemgr::fetch_vary_list();
         if (empty($this->_vary_list)) {
             $this->_vary_list = cachemgr::fetch_vary_list(true);
         }
     }
 }
예제 #2
0
 public function install()
 {
     $dbschema = $this->getPathname();
     if (is_file($dbschema)) {
         require $dbschema;
         foreach ($db as $key => $val) {
             if ($val['ignore_cache'] !== true) {
                 $data['type'] = 'DB';
                 $data['app'] = $this->target_app->app_id;
                 $data['name'] = strtoupper($this->target_app->app_id . "_" . $key);
                 $data['expire'] = time();
                 logger::info('Installing Cache_Expires DB:' . $data['name']);
                 app::get('base')->model('cache_expires')->replace($data, array('type' => $data['type'], 'app' => $data['app'], 'name' => $data['name']));
             }
             break;
         }
         logger::info('UPDATE CACHE EXPIRES KV DATA');
         cachemgr::store_vary_list(cachemgr::fetch_vary_list(true));
         //更新kv
     }
 }