In the module you generate the global variables as in

<?php
if (isset($variables['user']) && is_object($variables['user']) && $variables['user']->uid) {
   
$variables['user_name'] = ($_authcache_is_cacheable === true)
      ?
'<span class="authcache-user"></span>'
     
: $variables['user']->name;

   
$variables['user_link'] = ($_authcache_is_cacheable === true)
      ?
'<a href="" class="authcache-user-link">!username</a>'
     
: l($variables['user']->name, "user", array('alias' => TRUE));
  }
?>

So when caching is enable $user_name/$user_link are just place holder which authcache js deal with.
How can I accomplish similar behavior, for example adding ($user id) or other custom user specific links?
Do I have to modify the module or can it be extended? using hook_preprocess?