HOOK_BOOT
- Even cached page executes this hook
- This hook is called before modules or most include files are loaded into memory.
- It happens while Drupal is still in bootstrap mode.
HOOK_INIT :
- Perform setup tasks for non-cached page requests.
- Cached page doesn’t run this hook.
- When this hook is called, all modules are already loaded in memory.
- It happens after bootstrap mode.
- Add new comment
- 836 views
Comment
Difference hook boot & init
Submitted by RSK (not verified) on Thu, 08/23/2018 - 01:54
hook_boot: 1) even cached page execute, 2) before the modules loaded, 3) still in Bootstrap mode
hook_init: 1) tasks for non cached page, 2) after the modules loaded, 3) happens after Bootstrap mode