I have a problem in Boost module I have a dynamic site that Allow user to logged in to edit his content

after log into the site the login links disappear and another links loaded that contain user links (I use a custom block that check if user_is_logged_in echo <a href="nide/3/edit">you content</a> else echo <a href="user">sign in</a>)

but after installing boost the menu of login still appear after registration (still read the caching page)

is there any option that make pages to anonymous user only

This is my code

function login_block_info() {
    $blocks = array();
    $blocks['mylogin'] = array(
        'info' => t('Custom Login'),
    return $blocks;
function login_block_view($block_name = '') {
    if ($block_name == 'mylogin') 
        $output ="";
            global $user;
            $query = "select nid from node where uid = " . $user->uid;
            $result =db_query($query);
            $nodes = array();
            $output ='<ul class="register-menu">';
                foreach ($result as $node) {
                    $alias = drupal_get_path_alias('node/'.$node->nid);
                    $output .= '<li>'.l($node->title,'node/'.$node->nid.'/edit').'</li>';
            $output .= '<li>'.l(t('Change password'),'user/'.$user->uid.'/edit').'</li>';
            $output .= '<li>'.l(t('log out'),'user/logout').'</li>';
            $output .= "</ul>";
            $output .='<ul class="register-menu">
                         <li><a onclick="open_login()">log in</a></li>
                         <li><a onclick="open_register()">sign up</a></li>
            $output .= render(drupal_get_form('user_register_form'));
            $output .= '</div>';
        return array(
            'subject' => t(''),
            'content' => $output,


  • Can you post you code so we can have additional information of the problem? Thanks Jun 4, 2012 at 3:30
  • Please tell us also the Drupal version you are using, Boost version..etc.. Jun 4, 2012 at 3:31
  • I am using Drupal 7.8 and the latest version of Boost 7.x-1.0-beta1 and I will attach the code in the question
    – user7683
    Jun 4, 2012 at 10:39
  • check your htaccess configs? The rewrite rules check for the DRUPAL_UID cookie. If you remove that, then logged in users will hit the cache.
    – Ahmed
    Jun 4, 2012 at 15:49

1 Answer 1


Boost provides static page caching for Drupal enabling a very significant performance and scalability boost for sites that receive mostly anonymous traffic.

I am not sure if Boost can be used for authenticated users as well. Boost will capture rendered HTML pages and store them and when a request comes for same page instead of overloading the server with PHP execution it will send the already compiled HTML pages which will greatly increase performance. Auth cache is an alternate that allows caching for both authenticated and anonymous.

Your Answer

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