| 7 bootstrap.inc | registry_rebuild() |
Rescans all enabled modules and rebuilds the registry.
Rescans all code in modules or includes directories, storing the location of each interface or class in the database.
Related topics
2 calls to registry_rebuild()
- drupal_flush_all_caches in includes/
common.inc - Flushes all cached data on the site.
- simpletest_clean_environment in modules/
simpletest/ simpletest.module - Remove all temporary database tables and directories.
File
- includes/
bootstrap.inc, line 3116 - Functions that need to be loaded on every Drupal request.
Code
function registry_rebuild() {
system_rebuild_module_data();
registry_update();
}
Comments
How to Scan All Files (Including Unchanged)
PermalinkIf
registry_rebuild()does not produce the results you're looking for (meaning classes are not being found), you can try totruncate table registry_file;. This will cause Drupal to rescan ALL files, resulting in a longer rebuild time, but assuring that all files are re-scanned, including those it thinks have not changed. Be careful though and make sure you have a database backup before going around truncating tables...performance impact
PermalinkHow much time does this take on average to run? Am considering calling this as a plan E for an issue with tokens not being replaced we are having and am trying to figure out the performance impact that would have.