/**
  * Override of parent restart method
  *
  * @access public
  * @param string $file Template file to work on
  * @param string $tpldir Location of template files
  * @param array $files Filenames lookup
  * @param string $mainblock Name of main block in the template
  * @param boolean $autosetup If true, run setup() as part of restarting
  * @param string $tag_start {
  * @param string $tag_end }
  * @param int $cache_expiry Seconds to cache for
  * @param string $cache_unique Unique file id (e.g. session_id())
  * @param string $cache_dir Cache folder
  * @param string $cache_ext Cache file extension
  */
 public function restart($file, $tpldir = '', $files = null, $mainblock = 'main', $autosetup = true, $tag_start = '{', $tag_end = '}', $cache_expiry = 0, $cache_unique = '', $cache_dir = './xcache', $cache_ext = '.xcache')
 {
     if ($cache_expiry > 0) {
         $this->cache_expiry = $cache_expiry;
     }
     if (!empty($cache_unique)) {
         if (!preg_match('/^\\./', $cache_unique)) {
             $cache_unique = '.' . $cache_unique;
         }
         $this->cache_unique = $cache_unique;
     }
     if (!empty($cache_dir)) {
         $this->cache_dir = $cache_dir;
     }
     if (!empty($cache_ext)) {
         if (!preg_match('/^\\./', $cache_ext)) {
             $cache_ext = '.' . $cache_ext;
         }
         $this->cache_ext = $cache_ext;
     }
     // Call parent restart method but don't run setup yet!
     parent::restart($file, $tpldir, $files, $mainblock, false, $tag_start, $tag_end);
     if ($this->cache_expiry > 0) {
         $this->read_template_cache();
     }
     if (!$this->_template_is_cached && $autosetup) {
         $this->setup();
     }
 }