示例#1
0
 public function test_core_building()
 {
     \System\Cache::build_core();
     $dir = BASE_DIR . '/var/cache/runtime';
     $cmd = implode(';', array('cd ' . $dir, 'php core.php'));
     $out = '';
     $stat = 0;
     exec($cmd, $out, $stat);
     $this->assertEquals('', implode('', $out));
     $this->assertEquals(0, $stat);
     unlink($dir . '/core.php');
 }
示例#2
0
 /**
  * Build static cache
  *
  * @return void
  */
 public function cmd_static()
 {
     \System\Init::basic();
     $lib_list = \System\Composer::get_libs();
     $libs = array();
     foreach ($lib_list as $lib) {
         $libs[$lib] = $lib;
     }
     array_push($libs, null);
     \Helper\Cli::do_over($libs, function ($key, $name) {
         \System\Cache::build_static_for($name);
     }, 'Collecting static files');
 }
示例#3
0
 /**
  * Delete a session by ID.
  *
  * @param  string  $id
  * @return void
  */
 public function delete($id)
 {
     Cache::driver('memcached')->forget($id);
 }
示例#4
0
 /**
  * Delete a session by ID.
  *
  * @param  string  $id
  * @return void
  */
 public function delete($id)
 {
     Cache::driver('apc')->forget($id);
 }