write() public static méthode

Write the stack to the cache
public static write ( ) : void
Résultat void
Exemple #1
0
 /**
  * this method is called with register_shutdown_function() and writes all data queued into the cache
  * @static
  * @return void
  */
 public static function shutdown()
 {
     // set inShutdown to true so that the output-buffer knows that he is allowed to send the headers
     self::$inShutdown = true;
     // flush all custom output buffers
     while (@ob_end_flush()) {
     }
     // flush everything
     flush();
     if (function_exists("fastcgi_finish_request")) {
         fastcgi_finish_request();
     }
     // clear tags scheduled for the shutdown
     Cache::clearTagsOnShutdown();
     // write collected items to cache backend and remove the write lock
     Cache::write();
     Cache::removeWriteLock();
     // release all open locks from this process
     Model\Tool\Lock::releaseAll();
     // disable logging - otherwise this will cause problems in the ongoing shutdown process (session write, __destruct(), ...)
     \Logger::resetLoggers();
 }