/** * Render template. * * @access public * @param string $template * @param array $context (default: array()) * @return string */ public function render($template, array $context = array()) { $hash = hash('md5', $template); $file = $hash . '.twig'; if (!$this->cacheHandler->exists($file)) { $this->cacheHandler->save($file, $template); } return $this->twig->render($file, $context); }
/** * Remove procedure script cache. * * @access protected * @param string $filePath * @return void */ protected function remove($filePath) { $this->cacheHandler->delete($filePath); }
/** * Clear cache. * * @access public * @return void */ public function clearCache() { $this->cacheHandler->delete('phantomjs_*'); }