1

I have the problem that my installed and correctly (I hope so) set up boost module isn't caching anything. Turning on the debug mode, it always says is_cacheable = FALSE for every page - which would explain the behaviour.

There is no "is_cacheable_reason" flag set, but I found the part of the boost.module file where is_cacheable is set to false for me:

...
elseif (!drupal_page_is_cacheable()) {
$_boost['is_cacheable'] = FALSE;
return;

}

Its line 276 from the boost.module file - right in the function boost_exit(). drupal_page_is_cacheable() seems to be a native drupal function, but I don't know where drupal decides that no page should be cached.

1 Answer 1

1

Looking at drupal_page_is_cacheable, it appears that there are 4 functions that use the cacheable flag. drupal_page_get_cache and drupal_page_set_cache are to be expected, and use it simply as a flag. Unfortunatley, drupal_session_initialze and drupal_set_message set cacheable to false.

In session initialize, if a user has visited your site at all and has a session cookie and any session variables are set then the page will not be cached. Similarly, if you set any messages during the page generation, it will also not be cached. While the former may have benefit, the later (IMO) is completely ridiculous.

Also, this issue on Drupal.org, but that really only addresses the first issue of session variables and cookies.

... commenting out the 'return' fixed the issue for me. 404 and 403 still not cached and you can specify other pages to be excluded in the boost settings page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.