In which file to add the cache_clear_all function
You can set the block's caching in hook_block_info, like so:

function MODULE_block_info()
{
    $blocks = array();

    $blocks["BLOCK_NAME"] = array(
        "info"  =&gt; "BLOCK TITLE",
        "cache" =&gt; DRUPAL_NO_CACHE,
    );

    return $blocks;
}