本文整理匯總了PHP中Pimcore\Cache::write方法的典型用法代碼示例。如果您正苦於以下問題:PHP Cache::write方法的具體用法?PHP Cache::write怎麽用?PHP Cache::write使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Pimcore\Cache
的用法示例。
在下文中一共展示了Cache::write方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: shutdown
/**
* 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();
}