Esempio n. 1
0
 public function init()
 {
     $sqlDir = __ROOT__ . "app/sql/";
     $lock = \FileCache::isExist("sql.lock", $sqlDir);
     if ($lock) {
         $this->fileList = \FileCache::get("sql.lock", $sqlDir);
     }
     $this->ListSql($sqlDir);
     \FileCache::set("sql.lock", $this->fileList, $sqlDir);
 }
 public function init()
 {
     $sqlDir = __ROOT__ . "app/sql/";
     $lock = \FileCache::isExist("sql.lock", $sqlDir);
     if ($lock) {
         $this->fileList = \FileCache::get("sql.lock", $sqlDir);
     }
     $this->ListSql($sqlDir);
     //清除lock
     $clean = new SqlCleanCommand();
     $clean->init();
 }
Esempio n. 3
0
 private function getMethodsCache()
 {
     $file = 'route/routing_' . $this->route->getCurrentMethod() . '.php';
     if (\FileCache::isExist($file)) {
         return \FileCache::get($file);
     }
     $config = $this->createMethodsCache();
     \FileCache::set($file, $config);
     return $config;
 }
Esempio n. 4
0
 private function getRoutingConfig()
 {
     $file = 'route/routing.php';
     if ($this->container->getEnvironment() == "prod") {
         if (\FileCache::isExist($file)) {
             return \FileCache::get($file);
         }
     }
     $sources = \Config::get('routing::source');
     $routings = [];
     foreach ($sources as $source) {
         $routing = (include_once "src/{$source}/routing.php");
         if ($routing) {
             $routings = array_merge($routings, $routing);
         }
     }
     \FileCache::set($file, $routings);
     return $routings;
 }