How NOT to cache a hook_menu callback I wrote a callback in my hook_menu() implementation, wich won't work the way it is intended to because of caching. The callback just returns some text depending on a cookie. Something like that:

function _show_logoutpage(){
    if($_COOKIE['foo'] == true) {
        return 'foo';
    }
    else {
        return  'bar';
    }
}


The code is called after the user is logged out so I would say the user is anonymous. Problem is the the output is cached (since the last menu cache clear) so the logic won't work. 
Any idea how to fix this in a simple way?
$GLOBALS['conf']['cache'] = FALSE; 

See also module CacheExclude, here are some more details about it:


  This module provides a simple way to exclude certain pages from being cached. Sometimes you want all pages to be cached for anonymous users except for one or two pages that have dynamic or random or rotating content. If those pages are cached, the dynamic parts cease to be dynamic. This module allows an administrator to selectively exclude certain paths from being cached so that dynamic content is actually dynamic.