/**
  * Stores the specified template to cache using the cacheKey specified.
  *
  * @param string   $cacheKey The cacheKey for the Template
  * @param Template $template The template to store in the cache
  *
  * @return true
  */
 public function putTemplate($cacheKey, Template $template)
 {
     if ($template->getCacheTime() == null && !is_numeric($template->getCacheTime())) {
         $template->setCacheTime($this->defaultCacheTime);
     }
     $this->put($cacheKey, $template, (int) $template->getCacheTime());
     return true;
 }
 /**
  * @see TemplateEngineInterface::loadTemplateExtended
  */
 public function loadTemplateExtended(Template $template, &$globals)
 {
     $params = $template->getLocals();
     if (!empty($params['Presenter'])) {
         $template->setPresenter($params['Presenter']);
     }
     if (!empty($params['CacheTime'])) {
         $template->setCacheTime((int) $params['CacheTime']);
     } else {
         $template->setCacheTime(300);
     }
     if ($template->getCacheTime() > 0 && (empty($params['NoCache']) || StringUtils::strToBool($params['NoCache']) == false)) {
         $template->setCacheable(true);
     }
     return $template;
 }