Skip to content

Instantly share code, notes, and snippets.

@vladtsf
Created October 4, 2011 11:02
Show Gist options
  • Save vladtsf/1261356 to your computer and use it in GitHub Desktop.
Save vladtsf/1261356 to your computer and use it in GitHub Desktop.
Smarty cache
if ($display && !$this->caching && count($this->_plugins['outputfilter']) == 0) {
if ($this->_is_compiled($resource_name, $_smarty_compile_path)
|| $this->_compile_resource($resource_name, $_smarty_compile_path))
{
include($_smarty_compile_path);
}
} else {
ob_start();
if ($this->_is_compiled($resource_name, $_smarty_compile_path)
|| $this->_compile_resource($resource_name, $_smarty_compile_path))
{
include($_smarty_compile_path);
}
$_smarty_results = ob_get_contents();
ob_end_clean();
foreach ((array)$this->_plugins['outputfilter'] as $_output_filter) {
$_smarty_results = call_user_func_array($_output_filter[0], array($_smarty_results, &$this));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment