How to bypass Drupal page cache if a certain cookie is set on a shared domain? I have a drupal web site that lives on the same domain as another non-drupal website.For instance, The site is a.example.com. When my users logs in example.com a certain authentication cookie is set. However, when the user hit a.example.com, the user gets a cache hit. I know that hook_boot is invoked on all pages, however, how do I tell Drupal to bypass cache? Should I set a certain cookie?
I would like to now what is the proper way of doing something like this.
I would suggest looked at the Single Sign options of Drupal or implement some code that logs you into Drupal when they login to the non-Drupal site.

EDIT: first, boostrap Drupal and then run this function:

function drupal_user_login($username, $password)
{
    $uid = user_authenticate($username, $password);
    if($uid)
    {
        $form_state = array();
        $form_state['uid'] = $uid;
        user_login_submit(array(), $form_state);

        return true;
    }
    else
    {
        return false;
    }
}