PhpRiot
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Name

setCacheDir() — set the directory where the rendered template's output is stored

Description

Smarty setCacheDir(string cache_dir);

Example 205. setCacheDir()



<?php

// set directory where rendered template's output is stored
$smarty->setCacheDir('./cache');

// chaining of method calls
$smarty->setTemplateDir('./templates')
       ->
setCompileDir('./templates_c')
       ->
setCacheDir('./cache');

?>

   

See also getCacheDir() and $cache_dir.

Smarty Template Engine