Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

We have an interesting trouble on couple of our sites. The hook_page_build implementations sometimes looses some value from cache.

Look at this image: http://www.diigo.com/item/image/2peqe/drbq


  $implementations_cache = cache_get('module_implements', 'cache_bootstrap');
  $cache = $implementations_cache->data['page_build'];

I get this array: block, panels_everywhere, rules, admin_menu

Without cache

  $hook_info = module_hook_info();
  $hook = 'page_build';  
  $implementations[$hook] = array();
  $list = module_list(FALSE, FALSE, FALSE);
  foreach ($list as $module) {
    $include_file = isset($hook_info[$hook]['group']) && module_load_include('inc', $module, $module . '.' . $hook_info[$hook]['group']);
    if (function_exists($module . '_' . $hook)) {
      $implementations[$hook][$module] = $include_file ? $hook_info[$hook]['group'] : FALSE;

the $implementations['page_build'] are: block, metatag, panels_everywhere, toggle_page_elements, rules, admin_menu, admin_menu_toolbar.

We are using the latest dev memcache as cache backend.

As I see, only the _page_build hook is affected. I can't catch any event, which causes that, and I don't see any relevant in the log. Clear class registry fix it, but became wrong 1-2 times in a day.

Why are lost those values?

UPDATE on 01/18/13

added debug code to cache_set, I experienced the following:

This starts when a user load two pages close to same time:

  • user/%user/points 1358402424.7797

  • user/%user/subscriptions 1358402424.0462

Other hooks are affected: init, ctools_plugin_api, entity_view, flag_default_flag, element_info_alter, ctools_render_alter, page_build, form_alter

By the following modules: rate, a custom feature, metatag, metatag_opengraph, better_formats, admin_menu_toolbar, toggle_page_elements (this is a custom module)

The one thing, which is similar in these, these were added to the project relative later, but I'm not sure, these were the last modules.

I didn't see any relevant in system table too.

An additional speciality, but I think, it doesn't matter: This site uses a master-slave db environment with module autoslave.


Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.