Is it possible to apply Authcache caching to elements in page.tpl.php? In applying Authcache settings to an existing site I have encountered a problem where certain items hard-coded into the theme's page.tpl.php need to be personalised for each user. I could do it by moving those components into blocks and/or panels, but they are quite complex and I was wondering if a better approach would be to do it via the Authcache API using the authcache_usercookie.module example as a starting point. 

Here is an example of the code I would like to personalise:

&lt;?php if($page['topics_tab']): ?&gt;
&lt;div class="tabs-menu collapse hidden-print" id="topics-collapse-tab"&gt;
  &lt;div class="container"&gt;
    &lt;div class="row"&gt;
      &lt;div class="col-md-8 col-md-push-2"&gt;
        &lt;?php print render($page['topics_tab']); ?&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;?php endif; ?&gt;


Is it possible (easy? difficult?) to modify page.tpl.php to make Authcache cache this snippet for each user, or should I redo the page using blocks/panels?
I recommend to redo the page with blocks (or panels). The Authcache User Cookie example is rather basic and does not demonstrate how to deliver fragments from the custom front controller.

Regrettably there is still not enough documentation on how to roll your own custom fragment renderer. Look at the api.php files and read through the numerous submodules to get the picture.

Last but not least, there are some (closed) support requests in the ticket tracker covering this issue, e.g. #2780485.