/** * Clean Sugar cache directories: * Rebuild autoloader cache * Clean smarty cache * modules cache * themes cache * jsLanguage cache */ public function cleanCaches() { require_once "include/MetaDataManager/MetaDataManager.php"; $this->log("Cleaning cache"); $this->cleanFileCache(); $this->cleanDir($this->cacheDir("smarty")); $this->cleanDir($this->cacheDir("modules")); $this->cleanDir($this->cacheDir("jsLanguage")); $this->cleanDir($this->cacheDir("Expressions")); $this->cleanDir($this->cacheDir("themes")); $this->cleanDir($this->cacheDir("include/api")); // as far as database schema hasn't been rebuilt yet, it's needed to check // if metadata manager is operable if (MetaDataManager::isCacheOperable()) { MetaDataManager::clearAPICache(true, true); } else { // otherwise, disable it until the schema has been rebuilt MetaDataManager::disableCache(); } $this->log("Cache cleaned"); }
header('X-Accel-Buffering: no'); // Flush after each output so the user can see the progress in real-time ob_implicit_flush(); // When output_buffering is enabled - which is recommended in production - // make sure we flush the current output buffer(s) otherwise we are still // buffering at this point and real-time updates wont make it to the screen. while (@ob_end_flush()) { } require_once 'install/install_utils.php'; // since we need to make sure we have even the custom tabledictionary items in there $mi = new ModuleInstaller(); $mi->silent = true; $mi->rebuild_tabledictionary(); $mi->rebuild_vardefs(); require_once 'include/MetaDataManager/MetaDataManager.php'; MetaDataManager::disableCache(); include "modules/Trackers/tracker_perfMetaData.php"; include "modules/Trackers/tracker_queriesMetaData.php"; include "modules/Trackers/tracker_sessionsMetaData.php"; include "modules/Trackers/tracker_tracker_queriesMetaData.php"; require_once 'modules/TableDictionary.php'; $trackerManager = TrackerManager::getInstance(); $trackerManager->pause(); $cache_dir = sugar_cached(""); $line_entry_format = "     <b>"; $line_exit_format = "...   </b>"; $rel_dictionary = $dictionary; // sourced by modules/TableDictionary.php $render_table_close = ""; $render_table_open = ""; $setup_db_admin_password = $_SESSION['setup_db_admin_password'];