diff --git a/docs/en/programmers/api-variables/variable-cache-lifetime.xml b/docs/en/programmers/api-variables/variable-cache-lifetime.xml
index 033e02dd..493603a5 100644
--- a/docs/en/programmers/api-variables/variable-cache-lifetime.xml
+++ b/docs/en/programmers/api-variables/variable-cache-lifetime.xml
@@ -5,11 +5,11 @@
This is the length of time in seconds that a template cache is valid.
Once this time has expired, the cache will be regenerated. $caching must
- be set to "true" for $cache_lifetime to have any purpose. A value of -1
- will force the cache to never expire. A value of 0 will cause the cache
- to always regenerate (good for testing only, to disable caching a more
- efficient method is to set $caching = false.)
+ be turned on (either 1 or 2) for $cache_lifetime to have any purpose. A
+ value of -1 will force the cache to never expire. A value of 0 will cause
+ the cache to always regenerate (good for testing only, to disable caching
+ a more efficient method is to set $caching = 0.)
If $force_compile is
diff --git a/docs/en/programmers/caching/caching-setting-up.xml b/docs/en/programmers/caching/caching-setting-up.xml
index 0ef258b3..724ba084 100644
--- a/docs/en/programmers/caching/caching-setting-up.xml
+++ b/docs/en/programmers/caching/caching-setting-up.xml
@@ -3,7 +3,7 @@
Setting Up Caching
- The first thing to do is enable caching by setting $caching = 1 (or 2).
@@ -14,7 +14,7 @@
require('Smarty.class.php');
$smarty = new Smarty;
-$smarty->caching = true;
+$smarty->caching = 1;
$smarty->display('index.tpl');
?>
@@ -34,8 +34,8 @@ $smarty->display('index.tpl');
The files in the
$cache_dir
are named similar to the template name.
- Although they end in the ".php" extention, they are not really executable
- php scripts. Do not edit these files!
+ Although they end in the ".php" extention, they are not intended to be
+ directly executable. Do not edit these files!
@@ -81,9 +81,9 @@ $smarty->display('home.tpl');
every template file and config file that is involved with the cache file is
checked for modification. If any of the files have been modified since the
cache was generated, the cache is immediately regenerated. This is a slight
- overhead so for optimum performance, leave
+ overhead so for optimum performance, set
$compile_check
- set to false.
+ to false.
enabling $compile_check
@@ -93,7 +93,7 @@ $smarty->display('home.tpl');
require('Smarty.class.php');
$smarty = new Smarty;
-$smarty->caching = true;
+$smarty->caching = 1;
$smarty->compile_check = true;
$smarty->display('index.tpl');
@@ -111,7 +111,7 @@ $smarty->display('index.tpl');
linkend="chapter.debugging.console">debugging
purposes only, a more
efficient way of disabling caching is to set $caching = false (or 0.)
+ linkend="variable.caching">$caching = 0.
The is_cached() function
@@ -127,7 +127,7 @@ $smarty->display('index.tpl');
require('Smarty.class.php');
$smarty = new Smarty;
-$smarty->caching = true;
+$smarty->caching = 1;
if(!$smarty->is_cached('index.tpl')) {
// No cache available, do variable assignments here.
@@ -145,7 +145,7 @@ $smarty->display('index.tpl');
linkend="language.function.insert">{insert} template function. Let's
say the whole page can be cached except for a banner that is displayed down
the right side of the page. By using an
- {insert}
+ {insert}
function for the banner, you
can keep this element dynamic within the cached content. See the
documentation on {insert} for
@@ -167,7 +167,7 @@ $smarty->display('index.tpl');
require('Smarty.class.php');
$smarty = new Smarty;
-$smarty->caching = true;
+$smarty->caching = 1;
// clear out all cache files
$smarty->clear_all_cache();