Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The module installation page suggests that page_cache_invoke_hooks be set to FALSE or otherwise Drupal does not cache.
Based on my experiments, this flag tells drupal to invoke hook_boot and hook_exit when servinge a page from cache.
The relevant code resides in function _drupal_bootstrap_page_cache() and is
// If the skipping of the bootstrap hooks is not enforced, call
// hook_boot.
if (variable_get('page_cache_invoke_hooks', TRUE)) {
bootstrap_invoke_all('boot');
}
drupal_serve_page_from_cache($cache);
// If the skipping of the bootstrap hooks is not enforced, call
// hook_exit.
if (variable_get('page_cache_invoke_hooks', TRUE)) {
bootstrap_invoke_all('exit');
}
In other words, you can set 'page_cache_invoke_hooks' to TRUE and still serve pages from cache_page.
Unless this is specific to varnish then I do not see how this documentation is relevant.
Comment | File | Size | Author |
---|---|---|---|
#1 | varnish_page_cache_invoke_hooks_documentation-2113645.patch | 668 bytes | awm |
Comments
Comment #1
awm CreditAttribution: awm commentedattaching patch
Comment #2
joestewart CreditAttribution: joestewart commentedThis report appears to be correct. I think this is a related fix #804864-26: External page caching does only work when "page_cache_invoke_hooks" is set to FALSE. (Old "Aggressive Mode" is on)
Comment #3
awm CreditAttribution: awm commentedComment #4
awm CreditAttribution: awm commentedThis appears to have been fixed and committed.
http://cgit.drupalcode.org/varnish/commit/README.txt?id=e26bbaa2dad4a061...