private static function build_temp_cache()
 {
     $pso = pts_storage_object::recover_from_file(PTS_TEMP_STORAGE);
     if ($pso == false) {
         $pso = new pts_storage_object();
     }
     $pso->add_object('environmental_variables_for_modules', pts_module_manager::modules_environmental_variables());
     $pso->add_object('command_alias_list', pts_documentation::client_commands_aliases());
     $pso->save_to_file(PTS_TEMP_STORAGE);
 }
 public static function detect_modules_to_load()
 {
     // Auto detect modules to load
     $env_vars = pts_storage_object::read_from_file(PTS_TEMP_STORAGE, 'environmental_variables_for_modules');
     if ($env_vars == false) {
         $env_vars = pts_module_manager::modules_environmental_variables();
     }
     foreach ($env_vars as $env_var => $modules) {
         if (($e = pts_client::read_env($env_var)) != false && !empty($e)) {
             foreach ($modules as $module) {
                 if (!pts_module_manager::is_module_attached($module)) {
                     pts_module_manager::attach_module($module);
                 }
             }
         }
     }
 }