Modified caching sections to remove incorrect references to $caching = true or $caching = false (replaceing with 0, 1, 2 as appropriate. Also minor wording changes.

This commit is contained in:
boots
2006-05-04 19:22:07 +00:00
parent 06d203c81e
commit f6cbf30377
2 changed files with 16 additions and 16 deletions

View File

@@ -5,11 +5,11 @@
<para> <para>
This is the length of time in seconds that a template cache is valid. 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 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 be turned on (either 1 or 2) for $cache_lifetime to have any purpose. A
will force the cache to never expire. A value of 0 will cause the cache value of -1 will force the cache to never expire. A value of 0 will cause
to always regenerate (good for testing only, to disable caching a more the cache to always regenerate (good for testing only, to disable caching
efficient method is to set <link a more efficient method is to set <link
linkend="variable.caching">$caching</link> = false.) linkend="variable.caching">$caching</link> = 0.)
</para> </para>
<para> <para>
If <link linkend="variable.force.compile">$force_compile</link> is If <link linkend="variable.force.compile">$force_compile</link> is

View File

@@ -3,7 +3,7 @@
<sect1 id="caching.setting.up"> <sect1 id="caching.setting.up">
<title>Setting Up Caching</title> <title>Setting Up Caching</title>
<para> <para>
The first thing to do is enable caching by setting <link The first thing to do is enable caching by setting <link
linkend="variable.caching">$caching</link> = 1 (or 2). linkend="variable.caching">$caching</link> = 1 (or 2).
</para> </para>
<example> <example>
@@ -14,7 +14,7 @@
require('Smarty.class.php'); require('Smarty.class.php');
$smarty = new Smarty; $smarty = new Smarty;
$smarty->caching = true; $smarty->caching = 1;
$smarty->display('index.tpl'); $smarty->display('index.tpl');
?> ?>
@@ -34,8 +34,8 @@ $smarty->display('index.tpl');
The files in the The files in the
<link linkend="variable.cache.dir">$cache_dir</link> <link linkend="variable.cache.dir">$cache_dir</link>
are named similar to the template name. are named similar to the template name.
Although they end in the ".php" extention, they are not really executable Although they end in the ".php" extention, they are not intended to be
php scripts. Do not edit these files! directly executable. Do not edit these files!
</para> </para>
</note> </note>
<para> <para>
@@ -81,9 +81,9 @@ $smarty->display('home.tpl');
every template file and config file that is involved with the cache file is 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 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 cache was generated, the cache is immediately regenerated. This is a slight
overhead so for optimum performance, leave overhead so for optimum performance, set
<link linkend="variable.compile.check">$compile_check</link> <link linkend="variable.compile.check">$compile_check</link>
set to false. to false.
</para> </para>
<example> <example>
<title>enabling $compile_check</title> <title>enabling $compile_check</title>
@@ -93,7 +93,7 @@ $smarty->display('home.tpl');
require('Smarty.class.php'); require('Smarty.class.php');
$smarty = new Smarty; $smarty = new Smarty;
$smarty->caching = true; $smarty->caching = 1;
$smarty->compile_check = true; $smarty->compile_check = true;
$smarty->display('index.tpl'); $smarty->display('index.tpl');
@@ -111,7 +111,7 @@ $smarty->display('index.tpl');
linkend="chapter.debugging.console">debugging</link> linkend="chapter.debugging.console">debugging</link>
purposes only, a more purposes only, a more
efficient way of disabling caching is to set <link efficient way of disabling caching is to set <link
linkend="variable.caching">$caching</link> = false (or 0.) linkend="variable.caching">$caching</link> = 0.
</para> </para>
<para> <para>
The <link linkend="api.is.cached">is_cached()</link> function The <link linkend="api.is.cached">is_cached()</link> function
@@ -127,7 +127,7 @@ $smarty->display('index.tpl');
require('Smarty.class.php'); require('Smarty.class.php');
$smarty = new Smarty; $smarty = new Smarty;
$smarty->caching = true; $smarty->caching = 1;
if(!$smarty->is_cached('index.tpl')) { if(!$smarty->is_cached('index.tpl')) {
// No cache available, do variable assignments here. // No cache available, do variable assignments here.
@@ -145,7 +145,7 @@ $smarty->display('index.tpl');
linkend="language.function.insert">{insert}</link> template function. Let's linkend="language.function.insert">{insert}</link> template function. Let's
say the whole page can be cached except for a banner that is displayed down say the whole page can be cached except for a banner that is displayed down
the right side of the page. By using an the right side of the page. By using an
<link linkend="language.function.insert">{insert}</link> <link linkend="language.function.insert">{insert}</link>
function for the banner, you function for the banner, you
can keep this element dynamic within the cached content. See the can keep this element dynamic within the cached content. See the
documentation on <link linkend="language.function.insert">{insert}</link> for documentation on <link linkend="language.function.insert">{insert}</link> for
@@ -167,7 +167,7 @@ $smarty->display('index.tpl');
require('Smarty.class.php'); require('Smarty.class.php');
$smarty = new Smarty; $smarty = new Smarty;
$smarty->caching = true; $smarty->caching = 1;
// clear out all cache files // clear out all cache files
$smarty->clear_all_cache(); $smarty->clear_all_cache();