You are here

function Smarty::is_cached in Quiz 6.5

Same name and namespace in other branches
  1. 6.6 includes/moodle/lib/smarty/Smarty.class.php \Smarty::is_cached()

test to see if valid cache exists for this template

Parameters

string $tpl_file name of template file:

string $cache_id:

string $compile_id:

Return value

string|false results of {@link _read_cache_file()}

File

includes/moodle/lib/smarty/Smarty.class.php, line 983

Class

Smarty
@package Smarty

Code

function is_cached($tpl_file, $cache_id = null, $compile_id = null) {
  if (!$this->caching) {
    return false;
  }
  if (!isset($compile_id)) {
    $compile_id = $this->compile_id;
  }
  $_params = array(
    'tpl_file' => $tpl_file,
    'cache_id' => $cache_id,
    'compile_id' => $compile_id,
  );
  require_once SMARTY_CORE_DIR . 'core.read_cache_file.php';
  return smarty_core_read_cache_file($_params, $this);
}